Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There is an error in the parenthesis in the first if-clause:</p> <pre><code>if (spokendata.substring(posCount).indexOf("[") == -1) { speechArr.push(meSpeak.speak (spokendata.substring(posCount)),{ 'rawdata': true }); /* ... */ } else { /* ... */ } </code></pre> <p>so it is</p> <pre><code> meSpeak( spokendata.substring(posCount) ), { 'rawdata': true } </code></pre> <p>where "{ 'rawdata': true }" is <em>not</em> included as an option-object to speak(). (In fact the object forms a separate statement separated by the comma.)</p> <p>So speak() returns "undefined", since it is not called to return any sound-data. As a consequence of this <em>undefined</em> is then used as an argument to play() (which fails, since there is no sound data for playback).</p> <p>What you want would be:</p> <pre><code> speechArr.push(meSpeak.speak (spokendata.substring(posCount), { 'rawdata': true })); </code></pre> <p>Other: Just updated meSpeak to v.1.8.3, which now logs any erroneous type forwarded to play(). Also there's now a small timing gap before cleaning up any sound-data to work around a timing issue with Chrome (sometimes Chrome is still playing when the reported duration of the sound is reached). Additionally, we 1) now clean-up the internal filesystem and 2) return a unique, newly produced array in case speak() is called to return an array. <a href="http://www.masswerk.at/mespeak" rel="nofollow">http://www.masswerk.at/mespeak</a></p> <p>On methods producing any special gaps directly in meSpeak:</p> <p>a) Most unlikely option first: You could try mark-up/HTML-input using the "ssml"-option. (Maybe any tags would produce a gap of any length).</p> <p>b) Probably the easiest option: You could use line-breaks ("\n") providing any length for the extra-gap with the "linebreaks" option (e.g. 'meSpeak.speak("this is a\n pause", { "linebreaks": 3})')</p> <p>c) Finally you could provide any phonemes producing a pause directly in the input string (as phoneme tags). The eSpeak documentation gives the following example for an input string including phonems: "[[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]]" (See the very end of the page <a href="http://espeak.sourceforge.net/commands.html" rel="nofollow">http://espeak.sourceforge.net/commands.html</a>)</p> <p>On phonemes generally: "Phoneme mnemonics can be used directly in the text input to espeak. They are enclosed within double square brackets. Spaces are used to separate words, and all stressed syllables must be marked explicitly. eg: [[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]]" (<a href="http://espeak.sourceforge.net/phonemes.html" rel="nofollow">http://espeak.sourceforge.net/phonemes.html</a>)</p> <p>The eSpeak documentation links to the following resource as a documentation of the phoneme-mnemonics: <a href="http://www.kirshenbaum.net/IPA/ascii-ipa.pdf" rel="nofollow">http://www.kirshenbaum.net/IPA/ascii-ipa.pdf</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload