Anonymous user
Speech synthesis: Difference between revisions
no edit summary
Childishbeat (talk | contribs) m (A GlovePIE section has been added.) |
No edit summary |
||
Line 246:
<lang locobasic>|say,"This is an example of speech synthesis."</lang>
=={{header|M2000 Interpreter}}==
===Using Statement Speech===
<lang M2000 Interpreter>
Module UsingStatementSpeech {
Volume 100
Speech "This is an example of speech synthesis."
}
UsingStatementSpeech
</lang>
===Print each word as speak===
<lang M2000 Interpreter>
Module UsingEvents {
Declare WithEvents sp "SAPI.SpVoice"
That$="This is an example of speech synthesis."
EndStream=False
Function sp_Word {
Read New &StreamNumber, &StreamPosition, &CharacterPosition, &Length
Rem: Print StreamNumber, StreamPosition, CharacterPosition, Length
Print Mid$(That$, CharacterPosition+1, Length);" ";
Refresh
}
Function sp_EndStream {
Print
Refresh
EndStream=True
}
Const SVEStartInputStream = 2
Const SVEEndInputStream = 4
Const SVEVoiceChange = 8
Const SVEBookmark = 16
Const SVEWordBoundary = 32
Const SVEPhoneme = 64
Const SVESentenceBoundary = 128
Const SVEViseme = 256
Const SVEAudioLevel = 512
Const SVEPrivate = 32768
Const SVEAllEvents = 33790
Const SVSFDefault = 0&
Const SVSFlagsAsync = 1&
Const SVSFPurgeBeforeSpeak=2&
With sp, "EventInterests", SVEWordBoundary+SVEEndInputStream
Method sp, "Speak", That$, SVSFlagsAsync
While Not EndStream {Wait 10}
}
UsingEvents
</lang>
=={{header|Mathematica}}==
|