This repository was archived by the owner on Mar 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Text To Speech
Florian Bauer edited this page Sep 27, 2018
·
2 revisions
For text to speech we use the library MaryTTS.
It produces AudioInputStreams, whose bytes we copy over into a SourceDataLine from the java AudioSystem. This is important, because like that we don't need to close the SourceDataLine, which doesn't work under most linux systems.
The text to speech class currently has an internal queue of things to say, and pauses for 1 second after each output. While this pause the function isCurrentlyOutputting() still returns true. That is necessary, so Amy doesn't hear herself.
Before a string is passed to MaryTTS, some preprocessing is done. Like substituting °C and °F with their spoken form.