Playing a speech file as an audio clip.

Started by greg, Thu 05/07/2012 20:50:01

Previous topic - Next topic

greg

Is there any way to play a speech file (packaged in speech.vox) as an audio clip rather than as speech?

For example, to play a speech file as speech, I'd use cEgo.Say("&1234 I speak therefore I am."), which then plays EGO1234.ogg (which was packaged into speech.vox at compile time).

But is it possible to play EGO1234.ogg directly as an audio clip, i.e. to access that particular sound file within speech.vox?  Right now, my workaround is to import the speech file as an audio clip (e.g. aEGO1234) and then play it; but that's clunky for several reasons (e.g. duplicates data, not extensible since you have to import each sound manually in the editor, etc).

By the way, my goal in all this is to play a speech file in a non-blocking manner.  (I'm writing my own version of SayBackground that includes sound.)

Thanks,
Greg

monkey0506

Presently speech files cannot be played directly, only via the blocking Character.Say command. It's something that I think certainly needs to be reviewed at some point, but for right now we're doing good trying to hold together any form of organization as to getting things done with the engine. There's a lot of work left to do before we can really start implementing major changes like this (revamping the speech system).

greg


monkey0506

In the mean time, you may consider even implementing your own speech system using a separate AudioType for speech and some custom commands instead of the built-in speech system. I haven't actually pulled it up myself, but you may also want to look at the SpeechCenter plugin as it has some great features that may be useful to you as well.

Crimson Wizard

By the way, this was supposed to be implemented.
I found there is a function PlaySpeech prepared in the engine code, but currently it does nothing.

SMF spam blocked by CleanTalk