Page 1 of 1

Intergrating Meta Quest VoiceSDK

Posted: Thu Jun 22, 2023 9:39 am
by SoundGuy
Hey,

It should be straight forward, but can you walk me through the simplest way to extend dialogue system to intergrate a call to the Speak function from VoiceSDK as listed in this doc?


Use the TTSSpeaker script’s Speak(textToSpeak : string) method to request and say specified text.
Use the TTSSpeaker script’s Stop() method to immediately stop any playing TTS clips.

https://developer.oculus.com/documentat ... -overview/

I'm sure it's like 2-3 lines of code, but It's been a while since I messed about with hacking Dialogue System and now with the new OpenAI addon, i'm tempted to buy and use it , and to consider all my options, so I want to see if I can use this free TTS and not nessecerily use Elevenlabs.

I also would maybe like to see if i should use the Speech recognition of voiceSDK (formerly wit.ai ) instead of whisper, if I already and voice SDK intergrated.

Thanks,
Oded

Re: Intergrating Meta Quest VoiceSDK

Posted: Thu Jun 22, 2023 3:38 pm
by Tony Li
For text to speech, you can write a custom sequencer command or use an OnConversationLine() method in a script on the Dialogue Manager. Example:

Code: Select all

void OnConversationLine(Subtitle subtitle)
{
    var text = subtitle.formattedText.text;
    if (string.IsNullOrEmpty(text)) return;
    var ttsSpeaker = subtitle.speakerInfo.transform.GetComponent<TTSSpeaker>();
    if (ttsSpeaker != null) ttsSpeaker.Speak(text);
}
For Wit.ai, see this post. You may need to adjust the code slightly for VoiceSDK.

Re: Intergrating Meta Quest VoiceSDK

Posted: Fri Jun 23, 2023 7:16 am
by SoundGuy
Is there a recommended forum post, example, or a tutorial on how am i adding this script with the OnConversationLine() method?

And, I've seen that wit.ai post, yeah. I'll try to poke around.

Re: Intergrating Meta Quest VoiceSDK

Posted: Fri Jun 23, 2023 7:58 am
by Tony Li
Here's the manual section on OnConversationLine() and related methods.