LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .wav file executed by script (https://www.linuxquestions.org/questions/linux-newbie-8/wav-file-executed-by-script-852746/)

RavhisingRickRude 12-28-2010 01:13 AM

.wav file executed by script
 
Hello Everyone

I have a .wav file that ask "what's is your name in a robotic/computer voice. Is there I way I can execute that .wav file to execute as the script itself ask "What is your name?" giving the illusion that the computer is asking the question? Thanks again.

-RRR

TobiSGD 12-28-2010 01:19 AM

Most distros have aplay installed in a standard system, so try
Code:

aplay your-wav-file.wav

RavhisingRickRude 12-28-2010 01:32 AM

I was using mplayer and it works. But I wanted the .wav file to execute as the file "What is your name name?"

TobiSGD 12-28-2010 01:53 AM

I don't get want you want. You can't execute a sound-file? Do you want to just play that file? Do you want that simultaneous text is displayed? Do you want the user to put text in?
Please state clearly what you intend to do.

RavhisingRickRude 12-28-2010 02:38 AM

sorry. I want the the .wav file to play as the text "What is your name" is displayed. Yes I want them to be simultaneous because the .wav file itself has audio that actually says "what is your name"

honeybadger 12-28-2010 03:01 AM

I assume you want the sound file to be played when the pc boots up. In this case you would be required to put the code in the startup scripts. As far as the text is concerned I do not see it making a lot of sence but then you can put the question in /etc/motd.
Hope this helps.

tredegar 12-28-2010 04:06 AM

In script:

Code:

#!/bin/bash
aplay  /path/to/file  &
echo 'What is your name?'


john_erlandsson 12-28-2010 04:16 AM

Perhaps you should try festival with your script.
It is a text2speech tool that should be in your repo.

You can use it like this:

Code:

echo "Whats your name? "
echo "Whats your name?" | festival --tts

Might be fun...


All times are GMT -5. The time now is 11:03 PM.