Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: miguel on Wed 08/10/2003 18:52:38

Title: speech problem
Post by: miguel on Wed 08/10/2003 18:52:38
Hello to all,
  I have some questions about the DisplaySpeech function when using WAV files.

from the manual:
     You can also use speech with DisplaySpeech text script function.

DisplaySpeech (EGO, "&10 Hi! How are you?");
DisplaySpeech (DAVID, "&7 I'm fine.");

I used this example and rebuild the vox files like it says,
the WAV files have the correct names (first 4letters of the character scriptname and aply it, but as you have guessed, it's not working! It just doesn't play any sound.
I'm using a timer on the room that randomly plays sounds of birds, could this be afecting the sound channels?

thanks for help
Title: Re:speech problem
Post by: Scorpiorus on Wed 08/10/2003 20:21:35
hello, Miguel

So, they are speaking (speech text is displayed) but there is no sound? Isn't SetVoiceMove() called with the mode 1 somewhere? I am not sure if it affects DisplaySpeech(), just in case it does.

Btw, do you use PlaySound() for birds' songs?
Title: Re:speech problem
Post by: miguel on Fri 10/10/2003 02:37:37
Hi Scorpiorus,
yes I use PlaySound() for the birds, I checked the manual and it refers to SpeechVoxAvaiable thing, and the SetVoiceMode is by default (1) activated but I wrote the functions to make sure but the problem wasn't solved,
thanks for the help anyway :)
Title: Re:speech problem
Post by: Scorpiorus on Fri 10/10/2003 07:44:04
I just checked PlaySoundEx() about the channels:
channels:
0.......... Background music, used by PlayMusic  
1.......... Ambient sounds, used by PlayAmbientSound  
2.......... Voice speech, used when you have automatic speech in your game.
3-5....... Free channels, used by PlaySound, view frame sounds and so on.  

So, voice speech and PlaySound use different channels. Therefore birds shouldn't affect the voice. :P

Try to place the next lines somewhere:

if (IsSpeechVoxAvailable()==1) Display("voice pack is available");
else Display("there is no voice pack found");

to make sure AGS uses speech pack.

Title: Re:speech problem
Post by: miguel on Sat 11/10/2003 02:55:45
I did that and it returns that I don't have the voice pack, now my question is, how do I set it on? I didn't see any option on the editor for turning it on or any function that makes it avaiable. I have several lines of speech recorded but the PlaySound function doesn't allow to skip the spoken lines so it just  makes the game very slow making players listen to the full speech every time.
I am using the latest version of AGS.
well, I'll keep looking for a solution but I'm sure there's a 'simple' way of doing it because I've played games with speech avaiable and haven't read anything about people having dificulty with doing it.
thanks again for the help
Title: Re:speech problem
Post by: Scorpiorus on Sat 11/10/2003 11:51:20
hmm, open game\compiled folder. Theres should be a file named speech.vox.

If it isn't there check the wav files in the game\ folder.

Their names have to be like:

EGO(sound 1).....ego1.wav
DAVID(sound 3).....davi3.wav

Sound ID numbers have to be present in order for AGS to recognize the voice files.

If speech.vox is there, check game setup settings (file -> Setup Game). There is an option Use speech pack if available. Make sure it's ticked.


How does it go?
Title: Re:speech problem
Post by: miguel on Sat 11/10/2003 17:18:12
Ok, I know what the problem was, I had the 'ego1.wav' files on the compiled folder, so when I moved them to the game folder and did a rebuild vox files it all went right, I tought those files had to be on the compiled folder :-[, amateur mistake, thanks a lot for the help scorpiorus, I hope some day I can help you too, :)