I am creating a simple voice assistant in Raspberry pi 3. So when I speak in between a song playing the mpg123 stops the song or pauses. I want to make it like Alexa slowly increasing and slowly decreasing in the volume of the song.

So how can I do that gradually increasing or decreasing the volume in mpg123?

I have seen the issue: Control volume of mpg123

But I need some other way then that if possible.

  • What is wrong with the answer presented there? You don't want to use pulseaudio? Can you clarify what expectations you have.. Jul 16, 2019 at 6:40
  • I am using picroft which uses mpg123 to play mp3 file. If I am saying it to sing a song it runs mp3 files on local and when in between playing song I say it's wake up the word it pauses song not slowly turning the volume down and after it completes the interrupted command it again starts playing but without slowly increasing volume. So I wanted to operate volume as I said from the file but the command stated there: pacmd set-sink-input-volume 42 50% how can I implement this and I just don't want to mash up the default config in Picorft.
    – Lucifer
    Jul 16, 2019 at 6:49
  • Suppose I have used this command to lower the volume I have to run the 2-4 line of it and it will also I think to affect the interrupted speaking of a new answer. I just want to control volume without doing this:mpg123 --stdout ... | paplay --rate=44100 --format=s16le --channels=2 --stream-name=Music --client-name=Musicplayer --volume=65536
    – Lucifer
    Jul 16, 2019 at 6:51
  • I can't open another cmdline window to run that in picroft.
    – Lucifer
    Jul 16, 2019 at 9:48


You must log in to answer this question.

Browse other questions tagged .