Difference between revisions of "Lua:speak"
Jump to navigation
Jump to search
(→Samples) |
(→Related Functions) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 19: | Line 19: | ||
|- | |- | ||
|flags | |flags | ||
− | | | + | |Predefined variables |
− | |https://msdn.microsoft.com/en-us/library/speechplatform_speakflags.aspx | + | |<pre> |
+ | SPF_DEFAULT | ||
+ | SPF_ASYNC | ||
+ | SPF_PURGEBEFORESPEAK | ||
+ | SPF_IS_FILENAME | ||
+ | SPF_IS_XML | ||
+ | SPF_IS_NOT_XML | ||
+ | SPF_PERSIST_XML | ||
+ | SPF_NLP_SPEAK_PUNC | ||
+ | SPF_PARSE_SAPI | ||
+ | SPF_PARSE_SSML | ||
+ | SPF_PARSE_AUTODETECT | ||
+ | </pre> | ||
+ | For more read: | ||
+ | https://msdn.microsoft.com/en-us/library/speechplatform_speakflags.aspx | ||
+ | and https://github.com/cheat-engine/cheat-engine/blob/master/Cheat%20Engine/bin/defines.lua#L370 | ||
|- | |- | ||
|} | |} | ||
Line 30: | Line 45: | ||
</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) | ||
Line 37: | Line 52: | ||
=== Related Functions === | === Related Functions === | ||
− | * [[speakEnglish]] | + | * [[Lua:speakEnglish|speakEnglish]] |
Latest revision as of 00:54, 25 January 2018
function speak(text, waittilldone OPTIONAL)
function speak(text, flags)
Function Parameters[edit]
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 | Predefined variables | SPF_DEFAULT SPF_ASYNC SPF_PURGEBEFORESPEAK SPF_IS_FILENAME SPF_IS_XML SPF_IS_NOT_XML SPF_PERSIST_XML SPF_NLP_SPEAK_PUNC SPF_PARSE_SAPI SPF_PARSE_SSML SPF_PARSE_AUTODETECT For more read: https://msdn.microsoft.com/en-us/library/speechplatform_speakflags.aspx and https://github.com/cheat-engine/cheat-engine/blob/master/Cheat%20Engine/bin/defines.lua#L370 |
Samples[edit]
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)