Difference between revisions of "Lua:speak"
Jump to navigation
Jump to search
(→Samples) |
(→Samples) |
||
Line 30: | Line 30: | ||
</pre> | </pre> | ||
− | Read text from a file ''text.txt'' | + | Read text from a file named ''text.txt'' under the same directory as the table: |
<pre> | <pre> | ||
speak(TrainerOrigin.."test.txt", SPF_IS_FILENAME) | speak(TrainerOrigin.."test.txt", SPF_IS_FILENAME) |
Revision as of 13:16, 19 June 2017
function speak(text, waittilldone OPTIONAL)
function speak(text, flags)
Function Parameters
Parameter | Type | Description |
---|---|---|
text | String | Text that should be spoken. |
waittilldone | Boolean | If true, the next LUA instruction will not execute until the text is spoken. |
flags | Bit-field | https://msdn.microsoft.com/en-us/library/speechplatform_speakflags.aspx |
Samples
Simple text to speech:
speak("Say hello to my little friend.")
Read text from a file named text.txt under the same directory as the table:
speak(TrainerOrigin.."test.txt", SPF_IS_FILENAME)