Score:3

Program to replay sounds

cn flag

I am looking for something simple...but I can not find it. I need a simple program the plays prerecorded sounds when pressing a key. For example:

  • I press Ctrl+Alt+F1, it will play the X1 sound file
  • I press Ctrl+Alt+F2, it will play the X2 sound file

etc.

Do you have something in mind?

FedKad avatar
cn flag
See `man paplay`...
NewTeks avatar
cn flag
do you know any with user interface? thanks
vanadium avatar
cn flag
You do not need that. A program with a user interface cannot be bound to a shortcut key.
NewTeks avatar
cn flag
ok lets omit the shortcut key function. just plain buttons where the user can bind sound files on them. thanks
mchid avatar
bo flag
For some reason `paplay` doesn't play mp3 files for me. However, the `play` command from the `sox` package works fine.
mchid avatar
bo flag
and if `play` doesn't work, you could always use `mplayer` instead.
Score:0
bo flag

You can use the play command to play files from the command line.

First, install the necessary packages:

sudo apt update
sudo apt install sox "libsox-fmt*" libsox3 libsoxr0 libsoxr-lsr0 lame

Then, use the play command to play a file.

For example, if I have a file named sound1.mp3 in my user's ~/Music directory, I can use the following command to play the file:

play ~/Music/sound1.mp3

Go to Settings > Keyboard > Custom Shortcuts and set a custom shortcut to use your command. Do not use a shortcut that is already in use or it will not work. After you are finished, be sure to log out and log back in.

CTRL+ALT+F2 and the same for any F key will not work. These shortcuts are already in use.

However, you can use something like:

CTRL+ALT+SHIFT+F2 instead or something like

CTRL+SHIFT+1 or with any other number key will probably work.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.