Skip to content

ElevenLabs TTS

v1.1.0

The ElevenLabs TTS LOP generates high-quality, natural-sounding speech from text using the ElevenLabs API. It streams audio over WebSockets directly into a TouchDesigner CHOP for low-latency playback, and supports saving generated audio to disk and recalling previously generated clips from local storage or the ElevenLabs API history.

ElevenLabs TTS UI

  • ElevenLabs API Key: Obtain one from your ElevenLabs account and enter it on the ElevenLabs page. The key is stored securely in a local configuration file.
  • Python Dependencies: websockets, requests, numpy, and soundfile. Pulse ‘Install Dependencies’ on the ElevenLabs page to install them automatically, or pulse ‘Check Dependencies’ to verify they are present.
  • Input DAT (optional): When ‘Text Input Source’ is set to ‘Input DAT [ in2 ]’, the operator reads text from a DAT connected to its second input instead of the parameter field.
  • Output CHOP: Contains the streamed or loaded audio data (mono, 24kHz PCM). The CHOP output mode can be switched between ‘Playback’ and ‘Full Audio’ using ‘Output 1 (CHOP) out2’ on the Playback page.
  • Saved Audio Files: When ‘Auto Save To Disk’ is enabled, audio files (WAV, MP3, or OGG) and JSON metadata are saved to the configured ‘Output Folder’.
  1. Enter your ElevenLabs API Key on the ElevenLabs page.
  2. Pulse ‘Fetch Available Voices’ to populate the ‘Voice’ menu, then select a voice.
  3. Choose a ‘Model’ (Eleven Multilingual v2 is the default high-quality option; Turbo and Flash models offer lower latency).
  4. Enter text in ‘Text to Speak’.
  5. Ensure ‘Play On Result’ is enabled so audio plays as soon as it starts streaming.
  6. Pulse ‘Start Streaming’. Audio streams in and plays through the configured audio device.
  1. Set ‘Text Input Source’ to ‘Input DAT [ in2 ]’.
  2. Connect a Text DAT to the second input of the ElevenLabs operator.
  3. Enter or pipe text into that DAT.
  4. Pulse ‘Start Streaming’.
  1. On the Playback page, enable ‘Auto Save To Disk’.
  2. Set the ‘Output Folder’ and optionally configure ‘Base Name’ (use $JOBID for unique filenames), ‘File Type’ (WAV, MP3, or OGG), and ‘Auto Version’.
  3. Stream audio as usual. After a successful generation, the audio file and a JSON metadata file are saved automatically.
  4. To manually save the current audio, pulse ‘Save File’.
  1. On the History page, pulse ‘Update History’ to refresh the list from local storage and the ElevenLabs API.
  2. Use ‘Select From’ to filter between all sources, all local files, or the current project folder only.
  3. Choose an entry from the ‘Audio to Load’ menu. Use the ‘Display’ menu to change how entries are labeled (by voice name, input text, timestamp, or file path).
  4. Pulse ‘Load Audio File’ to load the selected audio into the output CHOP.
  5. Enable ‘Playback From History’ and pulse ‘Play Start’ to play the loaded clip.

The Playback page provides direct control over audio output hardware:

  • Driver: Choose between the default system driver (DirectSound on Windows, CoreAudio on macOS) or ASIO for low-latency output.
  • Device: Select the specific audio output device.
  • Volume: Adjust playback volume (0.0 to 1.0).

On the ElevenLabs page, three parameters fine-tune voice synthesis:

  • Stability: Controls randomness in the generated speech. Lower values produce more expressive but less consistent output.
  • Similarity Boost: Higher values make the output sound closer to the original voice sample, but may introduce artifacts at extreme settings.
  • Use Speaker Boost: Enhances speaker clarity. Recommended when using multilingual models.
  • No voices in the menu: Pulse ‘Fetch Available Voices’ after entering a valid API key. If the menu remains empty, check the API key and your network connection.
  • Audio not playing: Verify that ‘Play’ is enabled, the correct audio ‘Device’ is selected on the Playback page, and ‘Active’ is toggled on under Audio Device Settings.
  • Dependency errors: Pulse ‘Install Dependencies’ on the ElevenLabs page. If issues persist, pulse ‘Check Dependencies’ to see which packages are missing.
  • Credit limits: Pulse ‘Check Credits’ to view your current character usage, quota, and reset date in the ‘Credit Info’ field.
Status (Status) op('tts_elevenlabs').par.Status Str

Displays the current status of the operator.

Default:
"" (Empty String)
Active (Active) op('tts_elevenlabs').par.Active Toggle
Default:
False
Playing (Playing) op('tts_elevenlabs').par.Playing Toggle
Default:
False
Play Start (Playstart) op('tts_elevenlabs').par.Playstart Pulse
Default:
False
Play (Play) op('tts_elevenlabs').par.Play Toggle
Default:
True
Play On Result (Playonresult) op('tts_elevenlabs').par.Playonresult Toggle

Starts playback when the stream starts.

Default:
True
Start Streaming (Stream) op('tts_elevenlabs').par.Stream Pulse

Connects to the WebSocket and starts streaming TTS for the input text.

Default:
False
Stop Streaming (Stop) op('tts_elevenlabs').par.Stop Pulse

Disconnects the WebSocket and stops any ongoing streaming.

Default:
False
Clear Stored Audio (Clearaudio) op('tts_elevenlabs').par.Clearaudio Pulse

Clears any audio currently stored in the output CHOP.

Default:
False
Text Input Source (Textinput) op('tts_elevenlabs').par.Textinput Menu

Source of the text to be synthesized.

Default:
parameter
Options:
parameter, input_dat
Text to Speak (Text) op('tts_elevenlabs').par.Text Str

Text to convert to speech if Text Input Source is "Parameter Text".

Default:
text to speak
Model (Modelid) op('tts_elevenlabs').par.Modelid Menu

Select the synthesis model. Multilingual v2 is high quality, Turbo/Flash are lower latency.

Default:
eleven_multilingual_v2
Options:
eleven_multilingual_v2, eleven_turbo_v2, eleven_monolingual_v1, eleven_multilingual_v1, eleven_flash_v2_5
Voice (Voiceid) op('tts_elevenlabs').par.Voiceid Menu

Select the voice to use for synthesis. Use "Fetch Available Voices" first.

Default:
"" (Empty String)
Options:
Stability (Stability) op('tts_elevenlabs').par.Stability Float

Controls randomness. Lower values are more expressive but less stable.

Default:
0.5
Range:
0 to 1
Slider Range:
0 to 1
Similarity Boost (Similarityboost) op('tts_elevenlabs').par.Similarityboost Float

Higher values make the speech more similar to the original voice, but can introduce artifacts.

Default:
0.8
Range:
0 to 1
Slider Range:
0 to 1
Use Speaker Boost (Usespeakerboost) op('tts_elevenlabs').par.Usespeakerboost Toggle

Boosts speaker clarity. Recommended for multilingual models.

Default:
True
ElevenLabs API Key (Apikey) op('tts_elevenlabs').par.Apikey Str

Enter your ElevenLabs API key. It will be stored securely.

Default:
"" (Empty String)
Get API Key (Getapikey) op('tts_elevenlabs').par.Getapikey Pulse

Opens elevenlabs.io in your browser. Find the key in your account settings.

Default:
False
Fetch Available Voices (Getvoices) op('tts_elevenlabs').par.Getvoices Pulse

Retrieves the list of available voices from the ElevenLabs API.

Default:
False
Check Credits (Checkcredits) op('tts_elevenlabs').par.Checkcredits Pulse

Retrieves current usage and quota information from your ElevenLabs account.

Default:
False
Credit Info (Creditinfo) op('tts_elevenlabs').par.Creditinfo Str

Displays current character usage, limit, and reset date.

Default:
"" (Empty String)
Install Dependencies (Installdeps) op('tts_elevenlabs').par.Installdeps Pulse
Default:
False
Check Dependencies (Checkdeps) op('tts_elevenlabs').par.Checkdeps Pulse
Default:
False
Audio Device Settings Header
Active (Audioactive) op('tts_elevenlabs').par.Audioactive Toggle
Default:
True
Driver (Driver) op('tts_elevenlabs').par.Driver Menu
Default:
default
Options:
default, asio
Device (Device) op('tts_elevenlabs').par.Device Menu
Default:
{0.0.0.00000000}.{d7b929aa-ec27-4f96-bd39-78d6a8c2044a}||Out_1-2_(MOTU_M_Series)||1
Options:
default, {0.0.0.00000000}.{d7b929aa-ec27-4f96-bd39-78d6a8c2044a}||Out_1-2_(MOTU_M_Series)||1, {0.0.0.00000000}.{044f8ef8-f1ad-4655-90d6-0aef7b713b78}||Voicemeeter_AUX_Input_(VB-Audio_Voicemeeter_VAIO)||2, {0.0.0.00000000}.{0f011619-4954-432e-b132-2653e7136839}||LEN_P32u-10_(NVIDIA_High_Definition_Audio)||3, {0.0.0.00000000}.{2162b344-60a4-4dda-a068-a0887826a518}||Voicemeeter_VAIO3_Input_(VB-Audio_Voicemeeter_VAIO)||4, {0.0.0.00000000}.{25b313f1-54e3-4bae-b661-e07474413cab}||Voicemeeter_In_5_(VB-Audio_Voicemeeter_VAIO)||5, {0.0.0.00000000}.{34b7624e-63b1-49fc-93dc-1d03ca1dd600}||CABLE-B_In_16ch_(VB-Audio_Virtual_Cable_B)||6, {0.0.0.00000000}.{372fb62b-07aa-4580-b062-2c6adba187e7}||Out_3-4_(MOTU_M_Series)||7, {0.0.0.00000000}.{394e3e0c-eac4-4fc9-ad76-1600f0cb570b}||CABLE-A_Input_(VB-Audio_Virtual_Cable_A)||8, {0.0.0.00000000}.{7c163c65-5cda-4fbd-971b-27e1c3b471f0}||F13NA_(NVIDIA_High_Definition_Audio)||9, {0.0.0.00000000}.{896ef90b-e3f1-4838-909a-3c601a272e9d}||LS27A70_(NVIDIA_High_Definition_Audio)||10, {0.0.0.00000000}.{95545e0a-9e74-42cc-9835-fa5b33914d6c}||Voicemeeter_In_2_(VB-Audio_Voicemeeter_VAIO)||11, {0.0.0.00000000}.{a4936fe7-9e56-4176-9789-f343437419f2}||Voicemeeter_In_4_(VB-Audio_Voicemeeter_VAIO)||12, {0.0.0.00000000}.{a720258f-2455-411a-a701-1f8ecee9d3d6}||Voicemeeter_In_3_(VB-Audio_Voicemeeter_VAIO)||13, {0.0.0.00000000}.{ad8837d6-c905-4a72-adcb-7018ee7baab3}||CABLE_Input_(VB-Audio_Virtual_Cable)||14, {0.0.0.00000000}.{b8fcdf16-5164-47d2-80aa-0f80ce4bd0b5}||Voicemeeter_Input_(VB-Audio_Voicemeeter_VAIO)||15, {0.0.0.00000000}.{c6e56f21-72eb-46b0-9761-7ba5c2286004}||Voicemeeter_In_1_(VB-Audio_Voicemeeter_VAIO)||16, {0.0.0.00000000}.{d8576751-f212-4fa7-8cb5-0f825e64c87e}||CABLE-B_Input_(VB-Audio_Virtual_Cable_B)||17, {0.0.0.00000000}.{fddd6891-fc7b-4afa-8c26-9246692a19f0}||CABLE-A_In_16ch_(VB-Audio_Virtual_Cable_A)||18
Volume (Volume) op('tts_elevenlabs').par.Volume Float
Default:
1.0
Range:
0 to 1
Slider Range:
0 to 1
Save Audio To File Header
Auto Save To Disk (Autosavetodisk) op('tts_elevenlabs').par.Autosavetodisk Toggle

Automatically save generated audio and metadata locally after successful streaming.

Default:
True
Save File (Savefile) op('tts_elevenlabs').par.Savefile Pulse
Default:
False
Base Name (Name) op('tts_elevenlabs').par.Name Str

Base filename for saved audio. Use $JOBID for unique names.

Default:
"" (Empty String)
Output Folder (Folder) op('tts_elevenlabs').par.Folder Folder
Default:
tts_elevenlabs_outs
File Type (Filetype) op('tts_elevenlabs').par.Filetype Menu
Default:
wav
Options:
wav, mp3, ogg
Auto Version (Autoversion) op('tts_elevenlabs').par.Autoversion Toggle
Default:
True
CHOP Outputs Header
Output 1 (CHOP) out2 (Out2chop) op('tts_elevenlabs').par.Out2chop Menu
Default:
playback
Options:
playback, full_audio
Playback From History (Playbackfromhistory) op('tts_elevenlabs').par.Playbackfromhistory Toggle
Default:
False
Playing (Playinghistory) op('tts_elevenlabs').par.Playinghistory Toggle
Default:
False
Audio File Path (Audiofilepath) op('tts_elevenlabs').par.Audiofilepath Str
Default:
$TT/Audio/JeremyCaulfield_www.dumb-unit.com.mp3
Load Audio File (Loadfile) op('tts_elevenlabs').par.Loadfile Pulse

Downloads/Loads the audio for the specified History ID (local first) and loads it into the output CHOP.

Default:
False
Audio to Load (Generationid) op('tts_elevenlabs').par.Generationid Menu

Enter the job_id (local) or history_item_id (remote API) to recall audio.

Default:
"" (Empty String)
Options:
Select From (Selectfrom) op('tts_elevenlabs').par.Selectfrom Menu
Default:
all_local
Options:
all, all_local, project_only
Display (Display) op('tts_elevenlabs').par.Display Menu
Default:
name
Options:
job_id, text, timestamp, local_file, name
Update History (Fetchhistory) op('tts_elevenlabs').par.Fetchhistory Pulse

Retrieves the latest generation history items from the ElevenLabs API.

Default:
False
Callbacks Header
Create Callbacks (Createcallbacks) op('tts_elevenlabs').par.Createcallbacks Pulse
Default:
False
Callback DAT (Callbackdat) op('tts_elevenlabs').par.Callbackdat DAT
Default:
tts_elevenlabs_callbacks
onGenerate (Ongenerate) op('tts_elevenlabs').par.Ongenerate Toggle
Default:
True
onDone (Ondone) op('tts_elevenlabs').par.Ondone Toggle
Default:
True
onPlayStart (Onplaystart) op('tts_elevenlabs').par.Onplaystart Toggle
Default:
True
onPlayEnd (Onplayend) op('tts_elevenlabs').par.Onplayend Toggle
Default:
True
onSave (Onsave) op('tts_elevenlabs').par.Onsave Toggle
Default:
True
Textport Debug Callbacks (Debugcallbacks) op('tts_elevenlabs').par.Debugcallbacks Menu
Default:
Full Details
Options:
None, Errors Only, Basic Info, Full Details
Available Callbacks:
  • onGenerate
  • onDone
  • onPlayStart
  • onPlayEnd
  • onSave
Example Callback Structure:
def onGenerate(info):
# Called before streaming starts
# info: {'job_id', 'text', 'voice_id', 'model_id'}
print(f"Starting generation job: {info.get('job_id')}")

def onDone(info):
# Called when streaming finishes or errors
# info: {'job_id', 'status', 'message', 'duration', 'text', 'voice_id', 'model_id'}
print(f"Generation finished: {info.get('status')} ({info.get('duration')}s)")

def onPlayStart(info):
# Called when playback starts
# info: {'job_id', 'audio_duration', 'text'}
print(f"Playback started for job: {info.get('job_id')}")

def onPlayEnd(info):
# Called when playback ends
# info: {'job_id', 'audio_duration', 'text'}
print(f"Playback finished for job: {info.get('job_id')}")

def onSave(info):
# Called after audio is saved successfully
# info: {'job_id', 'filepath', 'filename', 'folder', 'duration', 'text'}
print(f"Audio saved to: {info.get('filepath')}")
v1.1.02025-07-30
  • Refactored Core Systems: Major overhaul to align the operator with the latest DotLOPUtils standards.
  • Centralized API Key Management: Switched to using the central key_manager for API key storage, eliminating local config files and extraneous folder creation on startup.
  • Unified Output Folder: All file-saving logic now correctly and exclusively uses the Folder parameter, ensuring all audio and metadata are stored in a single, user-defined location.
  • Robust Dependency Installation: Replaced the previous dependency check with the standard python_manager pattern, including a dedicated "Dependencies" page with an "Install Dependencies" button for a smoother setup.
  • Improved Stream Handling: Implemented an idle timeout for the websocket connection to prevent the onDone callback from being delayed, making the operator more responsive.
  • Bug Fix: Corrected an error in the audio streaming logic that was causing a crash when initializing the output CHOP.
  • Added Reset Functionality: Implemented a comprehensive ResetOp function and a corresponding UI button on a new "Settings" page to allow for a clean reset of the operator's state and logs.
  • Inheritance Update: Changed the base class from DotChatUtil to DotLOPUtils to leverage new helper functions.
v1.0.02025-04-28

Initial release