[英]Change the pitch of the sound but not changing its playback speed unity3d
I am just developing a sample app in unity (as a beginner) so i am stuck at a point, i need to change the sound which is recorded (like in Talking Tom app). 我只是统一(作为初学者)开发一个示例应用程序,所以我陷入了困境,我需要更改录制的声音(例如Talking Tom应用程序中的声音)。
i am done with recording the audio but when i increase the pitch of the sound the speed of the playback is also changed. 我已经完成了录制音频的工作,但是当我增加声音的音调时,播放速度也会改变。 i need the playback speed is normal only pitch must be changed.
我需要播放速度是正常的,只有音高必须更改。
so can anyone help me on this issue. 所以任何人都可以在这个问题上帮助我。
Thanks in advance 提前致谢
After a bit of researching, I found that what you're trying to do is called "pitch shifting". 经过一些研究,我发现您要尝试的操作称为“音高转换”。 It involves a lot of math and mucking about with sound packets apparently because changing the pitch of a sound, automatically changes it's playback speed.
显然,这涉及很多数学运算和处理声音数据包的问题,因为更改声音的音高会自动更改其播放速度。 Getting it back to the speed you want while still keeping the audio at something considered "normal" is no walk in the park.
恢复到所需的速度,同时仍将音频保持在“正常”水平,这并不是在公园散步。
In any case, since Unity3D uses C#, you might (and I stress the word might ) be able to use this open source library to get the sound effect you need. 无论如何,由于Unity3D使用C#,您可能(并且我强调这个词可能 )可以使用此开源库来获得所需的声音效果。 It's based on NAudio (also open source, and C#) so you should theoretically be able to use it, or parts of it in your project.
它基于NAudio (也是开放源代码和C#),因此从理论上讲,您应该可以在项目中使用它或它的一部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.