Nam Đỗ
Nam Đỗ

Reputation: 156

Android programming, how to change voice frequency

I want to play a WAV file at another frequency (300hz, 500hz... ) on Android. Is there any way to do so?

Upvotes: 1

Views: 832

Answers (1)

Squonk
Squonk

Reputation: 48871

Try using the SoundPool class.

It has a setRate(int streamID, float rate) method. Setting the rate to 1.0 will play at normal speed - setting rate of 2.0 will play at twice the speed and so on.

Changing playback rate will change frequency. If you have a plain tone of 100Hz then a rate of 3.0 will change it to 300Hz and a rate of 5.0 will change it to 500Hz for example.

Upvotes: 2

Related Questions