Speech Synthesis - lmparppei/BeatPlugins GitHub Wiki
Beat includes preliminary support for text-to-speech. Functionality will be expanded in future.
NOTE: The plugin has to reside in memory to use text-to-speech methods. To make it resident, you need to either register a window, observer (like Beat.onTextChange()
) or a widget.
Create a new speech synthesis instance
let speech = Beat.speech()
The object has following properties:
.rate
— speaking speed
.volume
— volume (from 0.0
to 1.0
)
.language
— speaking language identifier (ie. en
), defaults to system language
.pitchMultiplier
— speaker pitch
Speaking
Speak a string:
speech.speak("Hello world")
Speech will run in the background. You can stop the synthesis at any time:
speech.stop()