hltcoe / vaporengine

VaporEngine
3 stars 1 forks source link

Variable rate audio playback #7

Open jerome-white opened 8 years ago

jerome-white commented 8 years ago

Transcribing a term is sometimes difficult to do when hearing it real-time. The ability to slow it down -- particularly per speaker/instance -- might make it easier to discern what's being said.

charman commented 8 years ago

It looks like this should be pretty straightforward using PySox. sox implements a filter named "tempo" that uses WSOLA (waveform-similarity-based synchronized overlap-add) to adjust the speed of an audio clip without shifting the pitch.

Here's a snippet of PySox code that uses "tempo" to slow down an audio clip:

chain = pysox.CEffectsChain(infile, outfile)
chain.add_effect(pysox.CEffect('tempo', ['0.8']))
chain.flow_effects()