Desi Vocal

DesiVocalTools provides text-to-speech capabilities using Indian voices through the Desi Vocal API.

Example

The following agent can convert text to speech using Indian voices:

1from kern.agent import Agent
2from kern.tools.desi_vocal import DesiVocalTools
3
4agent = Agent(
5 instructions=[
6 "You are a text-to-speech assistant that converts text to natural Indian voices",
7 "Help users generate audio from text using various Indian accents and languages",
8 "Provide information about available voices and their characteristics",
9 "Create high-quality audio content for users",
10 ],
11 tools=[DesiVocalTools()],
12)
13
14agent.print_response("Convert this text to speech: 'Namaste, welcome to our service'", stream=True)

Toolkit Params

ParameterTypeDefaultDescription
api_keyOptional[str]NoneDesi Vocal API key. Uses DESI_VOCAL_API_KEY if not set.
voice_idOptional[str]"f27d74e5-ea71-4697-be3e-f04bbd80c1a8"Default voice ID to use for text-to-speech.
enable_get_voicesboolTrueEnable voice listing functionality.
enable_text_to_speechboolTrueEnable text-to-speech conversion functionality.

Toolkit Functions

FunctionDescription
get_voicesRetrieve list of available voices with their IDs and details.
text_to_speechConvert text to speech using specified or default voice.

Developer Resources