i'm using Ffmpeg
to change Audio Pitch
and Speed
and here's some command i'm trying:
ffmpeg -i audioPath -filter:a atempo=audioSpeed,asetrate=audioPitch -ar sampleRate -b:a xValue(k) output.mp3
ffmpeg -i audioPath -filter:a atempo=(audioSpeed / audioPitch),asetrate=(sampleRate * audioPitch),aresample=sampleRate
and i tried some more commands also with little bit of changes.
(here audioSpeed
and audioPitch
are in range of 0.5
to 2.0
, sampleRate
is between 8000
to 48000
and bitRate
is between range of 96k
to 320k
)
Now let's talk about the problem, if we only use atempo
, it will change audio speed and if we use asetrate
, it will change audio pitch
along with speed
and looks like it will ignore audioPitch
value if we do something like - samplerate * audioPitch
(if i use sampleRate = 8000
audio speed will decrease with thick voice and if sampleRate = 48000
audio speed will increase with thin voice(with means audioPitch
will adjust according to sampleRate
, as of i experienced from output audios))
What i want is if i change audioSpeed
to 0.5
and audioPitch
to 2.0
, then in output file speed will decrease and pitch will be also applied plus i have to change frequency(sample rate)
and bitrate
..
Any help will be appreciated, Thank you..