Peripherals++

Peripherals++

359k Downloads

Speaker Synthesize Function

Nohicom opened this issue ยท 3 comments

commented

Since the Speaker speak() function doesn't work, I'm using the synthesize() function. I'm confused on some of the parameters though.

The wiki says that it's "synthesize(string text, [number range, [string voice, [number pitch,[number pitchRange, [number pitchShift, [number rate, [number volume, [boolean wait]]]]]]]])", and I understand what "string text", "number range", and "boolean wait" are, and the others I get the idea of what it is, but what are the options for "string voice", and what is the "standard", or deafult/starting point, for the pitch, pitchRange, pitchShift, rate, and volume? As in, what would I set those to in order to keep them the same as before? The wiki doesn't give any information on that.

commented

All parameters after text are optional, however the defaults look like this:

text: null
range: practically infinite or the value set in the config
voice: "kevin16"
pitch: null
pitchRange: null
pitchShift: null
rate: null
volume: null
wait: false

commented
commented

The syntehsize function uses a TTS library called FreeTTS. I'm not too familiar with it myself, but from the documenation, I believe there are three different voices that vary in quality. Still, I'm not sure if all of these are availible through the synthesize function, so you'll have to test them out. You can read more about the voices here:
http://freetts.sourceforge.net/docs/index.php#voices_available