ID:259203
 
Here's something that could be added on a slow day...

usr.gold = 7
usr << sound('youhave.wav', text2file(usr.gold + ".wav"), 'gps.wav')

...which would report, "You have seven gold pieces."

I can't think of how to do this otherwise, unless you wanted to store a var for the exact length of each sound clip like so:

var/soundDatum/mySound
for(mySound in speechList)
usr << mySound.wavfile
sleep(mySound.length)

But I like the first method better. :)
Hmm... actually it's probably best just to use the timing method (which is built into Spuzzum's sound library). Do you suppose there's any way to include a means of querying a wav file for its length? E.g.:

sleep (getWavLength('allo.wav'))
On 8/15/00 6:58 am Guy T. wrote:
Here's something that could be added on a slow day...

usr.gold = 7
usr << sound('youhave.wav', text2file(usr.gold + ".wav"), 'gps.wav')

...which would report, "You have seven gold pieces."

I can't think of how to do this otherwise, unless you wanted to store a var for the exact length of each sound clip like so:

var/soundDatum/mySound
for(mySound in speechList)
usr << mySound.wavfile
sleep(mySound.length)

But I like the first method better. :)

What we're really talking about is text-to-speech, which most speech rec packages offer (eg Dragon). The problems are:

Unless you spend a ridiculous amount of money you only get very limited voices (synth).
I'm not sure what the distribution deal is...<clincher>
Linux support could be tricky. (When the client gets done:-)

It would be worth investigating... I haven't played with voice stuff for quite a while, maybe it's better now. Have dantom thought about this at all? It would really add a new dimension to the game!
In response to Al
It would be worth investigating... I haven't played with voice stuff for quite a while, maybe it's better now. Have dantom thought about this at all? It would really add a new dimension to the game!

My employer has a system that lets the public call for information about properties for sale. The information is produced by concatenating messages chosen from a huge selection of basic phrases, recorded once by a professional voicer. That's the kind of thing I was thinking of here. Of course I wouldn't use a professional voicer... it'd be me or one of my pals!
In response to Guy T.
On 8/15/00 7:55 am Guy T. wrote:
My employer has a system that lets the public call for information about properties for sale. The information is produced by concatenating messages chosen from a huge selection of basic phrases, recorded once by a professional voicer. That's the kind of thing I was thinking of here. Of course I wouldn't use a professional voicer... it'd be me or one of my pals!

I know what you are saying, and yes it would add a lot to the game. My two problems with that approach are that I'm too lazy/lacking theatrical talent to do the recording and you would get considerably more freedom with text-to-speech.
In response to Al
I know what you are saying, and yes it would add a lot to the game. My two problems with that approach are that I'm too lazy/lacking theatrical talent to do the recording and you would get considerably more freedom with text-to-speech.

Yep, that would be a nice feature, though as you noted, Dantom would probably have to license the technology from someone, and I imagine they have their hands full with business-type issues already...

Here's an idea that could be fun, if it actually worked. You could define basic phonemes and make a little wav for each one (editing them to trim out the silence before and after the sound). Then write a little proc to look up wav files based on phonetically-written sentences. Of course it would speak in a monotone, but still, it could work...

(You know, maybe you could obtain the phonemes by chopping up movie wavs. With enough patience, I could have Leslie Nielsen do voice-overs for my whole game!)
In response to Guy T.
On 8/15/00 10:47 am Guy T. wrote:
I know what you are saying, and yes it would add a lot to the game. My two problems with that approach are that I'm too lazy/lacking theatrical talent to do the recording and you would get considerably more freedom with text-to-speech.

Yep, that would be a nice feature, though as you noted, Dantom would probably have to license the technology from someone, and I imagine they have their hands full with business-type issues already...

Here's an idea that could be fun, if it actually worked. You could define basic phonemes and make a little wav for each one (editing them to trim out the silence before and after the sound). Then write a little proc to look up wav files based on phonetically-written sentences. Of course it would speak in a monotone, but still, it could work...

(You know, maybe you could obtain the phonemes by chopping up movie wavs. With enough patience, I could have Leslie Nielsen do voice-overs for my whole game!)

If I gave you my postal address could you mail me some of those pills you have?
In response to Al
If I gave you my postal address could you mail me some of those pills you have?

Ha! That's exactly what the Inquisition asked Galileo! :)
In response to Guy T.
On 8/15/00 10:47 am Guy T. wrote:
Yep, that would be a nice feature, though as you noted,
Dantom would probably have to license the technology from someone, and I imagine they have their hands full with business-type issues already...

This thread has given me a good laugh. Reason being that text2speech is one of those things that Dan and I have discussed (half-jokingly) for about three years. It just seems like a neat problem. Of course that temptation would be too good to pass off to a third party so we would have to spend two years coding the technology ourselves! Bottom line: don't count on it too soon.

To answer your first query, I like both of your suggestions for sound timing. It would be trivial to add a function to get the sound length, so at the very least we can do that.
In response to Tom H.
This thread has given me a good laugh. Reason being that text2speech is one of those things that Dan and I have discussed (half-jokingly) for about three years. It just seems like a neat problem. Of course that temptation would be too good to pass off to a third party so we would have to spend two years coding the technology ourselves! Bottom line: don't count on it too soon.

In the meantime, it would be neat if there was a freeware program that could be invoked from BYOND. Is there a client-side equivalent of the "shell" command? (I'm sure that could raise all manner of security issues, but I may as well ask.) I know there's a "run" command, but from what I could tell from looking at the Reference, it looks like it requires a file with a reserved extension (e.g., .mp3, .gif, etc.).

Heh... as soon as I got home I started chopping up WAV files to make my own little speech synthesizer. And good Lord it was awful. Good thing I only bothered to create about six phonemes before testing it... I guess Al was right! But you never know until you try...


To answer your first query, I like both of your suggestions for sound timing. It would be trivial to add a function to get the sound length, so at the very least we can do that.

Great!
In response to Tom H.
On 8/15/00 1:43 pm Tom H. wrote:
To answer your first query, I like both of your suggestions for sound timing. It would be trivial to add a function to get the sound length, so at the very least we can do that.


Well in an attempt to take an inch and make it a mile...would it work to report animation timing?

Two scenarios:

- You have a long involved animation for frying eggs, and you don't want the fried eggs to actually exist in the world until the long involved animation has completed.

- More likely: You go to the effort of creating a somewhat involved combat animation, and you don't want the "hit" to take place until the animation is done. That way someone could see the flying round house kick coming and move out of the way.
In response to Deadron
On 8/15/00 6:14 pm Deadron wrote:

Well in an attempt to take an inch and make it a mile...would it work to report animation timing?

Yes. I think this would be useful too. In theory you should be able to do it yourself by knowing the tick length of the file and performing sleep() calls, but that just seems cludgy to me. When I wrote the dungman module a while back, I had to put in all sorts of hacks to get the animations to sync up properly. It would be better if we had a built-in system for it. Let us think about it for a bit...
In response to Guy T.
On 8/15/00 4:32 pm Guy T. wrote:

In the meantime, it would be neat if there was a freeware program that could be invoked from BYOND. Is there a client-side equivalent of the "shell" command? (I'm sure that could raise all manner of security issues, but I may as well ask.) I know there's a "run" command, but from what I could tell from looking at the Reference, it looks like it requires a file with a reserved extension (e.g., .mp3, .gif, etc.).

You are correct on both counts. We could probably augment "run" to support launching of executables without a file
extension. By default it's pretty security-conscious (doing queries to the client to ensure that the run is okay), so this addition shouldn't be problematic. It's on the list.

BTW, good to have you back. How was your vacation? I assume you brought your laptop and coded great things while on the lake :) Okay, now I'm in violation of my own anal forum rules.
In response to Tom H.
We could probably augment "run" to support launching of executables without a file extension.

Swell! Now that I think about it, even assuming I could get the user to install a program, I wonder how I'd find it to run it... I suppose I could just give the user an option to download the program through BYOND. But that wouldn't handle more complex programs that use an install wizard... hmm. I'll cross that bridge when I come to it, I guess.


BTW, good to have you back. How was your vacation? I assume you brought your laptop and coded great things while on the lake :) Okay, now I'm in violation of my own anal forum rules.

It's good to be back. (I was hoping when I returned there'd be ordering information for the book, but I'll be patient. :) Vacation was refreshing; I even got to see a beautiful display of the Northern Lights. I didn't do much code writing, but I did plenty of text writing. My game is going to contain lots and lots of documents...