+2

text-to-speech

Carolina Quintero Barrios 10 years ago updated by Gil 10 years ago 3
when i insert text-to-speech the audio allows me a limit number of words. I know i can add several audios into the same scene. So my question is: Can I set that the audio2 plays after audio1 finishes?
+1
Carolina - 

Yes, you can do that using our API functionality. 
It is not difficult, but requires basic programming knowledge.

A couple of technical examples are available in our support section - 

http://www.oddcast.com/support/sayMultipleText.html

http://www.oddcast.com/support/Text_Limit.html">http://www.oddcast.com/support/Text_Limit.html

Click on "view the source of this page" at the bottom to see the HTML code.

Hope this helps,
Gil
SitePal Team
Thank you Gil for your help.

However, I still have 2 questions: (sorry about i don't know to much programming):

1) Is just this code which i have to insert it? What does this numbers "1,1,3" mean?

SCRIPT LANGUAGE="JavaScript"

function vh_sceneLoaded(){ //event function
singAsong();
}

function singAsong(){
sayText('my_paragraph1',1,1,3);
sayText('my_paragraph2',1,1,3);
sayText('my_paragraph3',1,1,3);

}
/SCRIPT

2) Where exactly have i put into this code?

Many thanks.

:)
+2
1. Yes!
it is indeed the code you should add
( note that this forum filtered out certain characters so be careful to copy the code again from the original - not from here ) 

The parameters 1, 1, 3 refer to "Voice ID", "Language ID" and "Engine ID" respectively.

You can see a detailed description of the parameters as well as a list of the available voices, languages and engines, in our API reference - 
http://www.oddcast.com/support/docs/vhost_API_Reference.pdf" rel="nofollow" href="http://www.oddcast.com/support/docs/vhost_API_Reference.pdf">http://www.oddcast.com/support/docs/vhost_API_Reference.pdf

Check out: "sayText" - on p. 9  & "Appendix B" on p. 28

2. 
Although the code segment can go pretty much anywhere in the BODY section of your page - it might be simplest immediately after your (first) BODY tag. Search for the word BODY in your HTML page (This tag should appear twice, to open and close the body section)
Open a new line right after the first BODY tag, and paste in the code there.

Hope this helps,
Gil