tools.voice_clone module
Voice synthesis tool: text-to-speech via ElevenLabs through Puter.js.
Delegates synthesis to bot.voice.router.synthesize(), which routes
through the Puter.js/ElevenLabs shim and returns a path to a generated
audio file.
- tools.voice_clone.define()[source]
Return the tool definition (name, description, JSON parameters).
- Returns:
Tool metadata consumed by the tool registry.
- Return type:
- async tools.voice_clone.execute(kwargs, context)[source]
Synthesize speech and, when possible, post the audio to the channel.
Calls
bot.voice.router.synthesize()withvoice_nameandtextfromkwargs. Ifcontextcarries achannel_idand a usablediscord_client, the resulting file is best-effort sent to that Discord channel; failures to send are swallowed.