if I have longer texts to read I like to have them read to me with the following script from https://wiki.ubuntuusers.de/Sprachausgabe/#SVOX-pico2wave .

1  #!/bin/bash    
2  pico2wave -l=de-DE -w=/tmp/test.wav "$(cat ${1})"
3  avplay -f wav -loglevel 0 >/dev/null -x 100 -y 50  -vn -autoexit /tmp/test.wav
4  rm /tmp/test.wav

Save the script as svox.sh in /usr/local/bin and start it with

svox.sh TEXTFILE.txt

That works really well with English texts (with "pico2wave -l=en-GB [...]" in line 2 of course) but the audio-speed in German is a bit slow.

What I´ve tried so far is replacing line 3 with

avplay -f wav -loglevel 0 >/dev/null -x 100 -y 50  -vn -autoexit -filter:a "atempo=2.0" /tmp/test.wav 

yet that didn´t work. In order to find out why that is I tried typing the following command in the terminal:

avplay -f wav -x 100 -y 50  -vn -autoexit -filter:a "atempo=2.0" test.wav

I got the following error-message:

Failed to set value 'atempo=2.0' for option 'filter:a': Option not found

So it seems that either the syntax isn´t correct or the option isn´t supported. Does anyone know of a way to speed up the audio output?


my system: Linux/Lubuntu 16.04.5 LTS, 64 bit

3 Answers 3


One can use the -af option like so:

ffplay -af "atempo=2" <audio_file>

This will play the audio file at two times the speed. More info here:


  • 1
    Thanks a lot, Robert. Your command works as desired nad is clearly of great help. Tnx again and have a Happy New Year.
    – Rosika
    Dec 31, 2020 at 13:57
  • Glad to be of help! Feel free to mark it as the answer. Happy New Year! Dec 31, 2020 at 19:03

in the meantime I managed to solve this problem with a workaround. I use this script:


pico2wave -l=de-DE -w=/tmp/test.wav "$(cat ${1})"
ffmpeg -i /tmp/test.wav -filter:a "atempo=1.2" -vn /tmp/test2.wav  # increase speed by a factor of 1.2
firejail --net=none avplay -f wav -loglevel 0 >/dev/null -x 100 -y 50  -vn -autoexit /tmp/test2.wav  # play sound in a sandbox
rm /tmp/test.wav
rm /tmp/test2.wav

If you are happy to use MPlayer rather than FFplay there is a relatively easy method to accomplish your goal. Use the following syntax:

mplayer -af scaletempo -speed 0.5 my_file.mp4

Remember to replace my_file.mp4 with the name of your actual media file. Now during playback you can use the following keys:

{   <---This key will dynamically slow the playback speed
}   <---This key will dynamically increase playback speed

Hopefully this will accomplish your goal.


  • Thanks a lot, Andrew. That´s exactly what I was looking for. I´m perfectly happy to use MPlayer and this command really does the trick. It´s really cool and I´m going to use in my script. Tnx also for your link. Seems like your homepage has a lot of interesting topics for me. Cheers.
    – Rosika
    Jan 22, 2019 at 13:24
  • @Rosika Great news :)
    – andrew.46
    Jan 22, 2019 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.