Text to Speech
TOX name base_txt_to_speech
Summary
A TouchDesigner component for generating synthetic speech with the Google Gemini API.
Controls
Refer to the Common Controls for a list of all available parameters.
Prompts
One interesting element to consider when writing prompts for Text to Speech is how you can provide inline instructions about tonality. You can provide instructions for the model about delivery by enclosing them in square brackets. For example, consider the following:
[menacingly] Have a great day!
[cheerfully] Have a great day!
While the text is the same, these prompts will produce different results. You can change the intonation of your prompt by adding another set of square brackets.
[menacingly] Have a great day! [cheerfully] Just kidding, keep your chin up
| Parameter Name | Parameter | Type | Description |
|---|---|---|---|
| Voice | Voice | menu | The available voice options for generating speech |
| Export Audio File | Exportaudiofile | pulse | Allows for exporting audio from component - using this parameter will open a dialog asking you where to save the file |
| File | File | file | (Read Only) Path of source. |
| Reload | Reloadpulse | pulse | Instantly reload the file from disk. |
| Play | Play | toggle | Audio will playback when this is set to 1 and stop when set to 0. |
| Speed | Speed | float | This is a speed multiplier which only works when Play Mode is Sequential. A value of 1 is the default playback speed. A value of 2 is double speed, 0.5 is half speed and so on. This node can not play audio backwards so negative values will not work well. |
| Cue | Cue | toggle | Jumps to Cue Point when set to 1. Only available when Play Mode is Sequential. |
| Pulse Cue | Cuepulse | pulse | Instantly jumps to the Cue Point. |
| Repeat | Repeat | menu | Repeats the audio stream when the end is reached. |
| Volume | Volume | float | Set the level the file is read in at. A setting of 1 is full signal while 0 is muted. |
| Fade In/Out | Fade | toggle | about |
Outputs
| Output Index | Name | Type | Description |
|---|---|---|---|
| 0 | out_response | TOP | The video output from the Google Gemini API |
| 1 | out_response_audio | CHOP | The video audio output from the Google Gemini API |