Howto Speed up / Slow down a playback

Hi, I’m looking for a way to speed up and slow donw a playback. I was looking on the dicate application code but so far I don’t really get what it is doing and moreover how could I use it to really slow down the playback. Is there a known solution with the API or I should have a look on external tools / providers?

Thanks
M.

See the stretch sub-command of sox.

I presume this will be a fairly compute intensive operation, as I imagine that you have to convert to the frequency domain, at frequent intervals, spread out those intervals and interpolate, then convert back to the time domain, smoothing over the joins between each block for the transform.

Depending on how much integration with Asterisk you need, there may be significant custom coding.

Hi David,
Thanks for your answer, so far I haven’t found any already existing methods in the API. Btw: I’m working with the 1.8.10.0 and we should stick to this version but I’m checking the 10 & 11 versions to see if there are some new commands that could fit…

I was already thinking about a solution playing with the sample rate but this looks quite complicate and will be probably very heavy for the cpu… anyway my goal is to write and use a simple dialplan application that I will call through the AGI and will spped up or slow down the current playback by using specific DTMFs. I don’t feel very confortable with the concepts of the API, have hard time to understand and to find relavant information about that. Could you suggest a site or docuements to read to have a good overwiev of the API and the main concepts?

Other solution would be to use some external solution but I can find any, are you aware about that kind of tools?

Thanks for your help,

Regards,
Marc

There will not be anything in the API. It will have to be done using external tools.

Simply changing the sample rate which change the pitch including that of the voice formants. That’s why it needs to be done in the frequency domain.