<doc>
  <legacy_id>1715</legacy_id>
  <name>revSpeak</name>
  <type>command</type>
  <syntax>
    <example>revSpeak <i>phraseToSpeak</i></example>
  </syntax>
  <library>Speech library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Images &amp; Multimedia</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <command tag="revSetSpeechSpeed">revSetSpeechSpeed Command</command>
    <command tag="revUnloadSpeech">revUnloadSpeech Command</command>
    <command tag="revSetSpeechVolume">revSetSpeechVolume Command</command>
    <function tag="revIsSpeaking">revIsSpeaking Function</function>
    <function tag="revSpeechVoices">revSpeechVoices Function</function>
  </references>
  <history>
    <introduced version="2.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Speaks text through the computer's speakers.</summary>
  <examples>
    <example>revSpeak "Hello world"</example>
    <example>revSpeak field "Biography Text"</example>
  </examples>
  <description>
    <p>Use the <b>revSpeak</b> <glossary tag="command">command</glossary> to use the computer's <glossary tag="text to speech">text-to-speech</glossary><code/> capability.</p><p/><p><b>Parameters:</b></p><p>The <i>phraseToSpeak</i> is a <keyword tag="string">string</keyword> of any length.</p><p/><p><b>Comments:</b></p><p>The <b>revSpeak</b> <glossary tag="command">command</glossary> uses the voice, pitch, and speed specified by the <command tag="revSetSpeechVoice">revSetSpeechVoice</command>, <command tag="revSetSpeechPitch">revSetSpeechPitch</command>, and <command tag="revSetSpeechSpeed">revSetSpeechSpeed</command> <glossary tag="command">commands</glossary>. If you haven't used these <glossary tag="command">commands</glossary> during the current session to specify a voice, pitch, or speed, the system's settings are used.</p><p/><p><code/><b>Note:</b><code/> If you <glossary tag="execute">execute</glossary> the <b>revSpeak</b> <glossary tag="command">command</glossary> while another speech is being spoken, the first speech is stopped and the second speech begins immediately. To find out whether the computer is already speaking, use the <function tag="revIsSpeaking">revIsSpeaking</function> <control_st tag="function">function</control_st>, as in the following example:</p><p/><p><code>  if revIsSpeaking then answer "Just a moment..."</code></p><p><code>  else revSpeak it</code></p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> If your application uses <glossary tag="text to speech">text to speech</glossary>, you should <glossary tag="execute">execute</glossary> the <command tag="revUnloadSpeech">revUnloadSpeech</command> <glossary tag="command">command</glossary> either when your application is finished using <glossary tag="text to speech">text to speech</glossary>, when the <object tag="stack">stack</object> that uses <glossary tag="text to speech">speech</glossary> is closed (in a <message tag="closeStack">closeStack</message> <glossary tag="handler">handler</glossary>), or when your application quits (in a <message tag="shutdown">shutdown</message> <glossary tag="handler">handler</glossary>). This saves memory.</p><p/><p>If text to speech is not available on the current system, the <b>revSpeak</b> <glossary tag="command">command</glossary> sets the <function tag="result">result</function> <control_st tag="function">function</control_st> to an error message.</p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> The <b>revSpeak</b> <glossary tag="command">command</glossary> is part of the <glossary tag="Speech library">Speech library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section on the General screen of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure "Speech" is selected in the list of script libraries.</p>
  </description>
</doc>