@@ -11,7 +11,7 @@ export const TtsBlock: BlockConfig<TtsBlockResponse> = {
1111 description : 'Convert text to speech using AI voices' ,
1212 authMode : AuthMode . ApiKey ,
1313 longDescription :
14- 'Generate natural-sounding speech from text using state-of-the-art AI voices from OpenAI, Deepgram, ElevenLabs, Cartesia, Google Cloud, Azure, and PlayHT . Supports multiple voices, languages, and audio formats.' ,
14+ 'Generate natural-sounding speech from text using state-of-the-art AI voices from OpenAI, Deepgram, ElevenLabs, Cartesia, Google Cloud, Azure, PlayHT, and Gandr . Supports multiple voices, languages, and audio formats.' ,
1515 docsLink : 'https://docs.sim.ai/integrations/tts' ,
1616 category : 'blocks' ,
1717 integrationType : IntegrationType . AI ,
@@ -41,6 +41,7 @@ export const TtsBlock: BlockConfig<TtsBlockResponse> = {
4141 { label : 'Google Cloud TTS' , id : 'google' } ,
4242 { label : 'Azure TTS' , id : 'azure' } ,
4343 { label : 'PlayHT' , id : 'playht' } ,
44+ { label : 'Gandr' , id : 'gandr' } ,
4445 ] ,
4546 value : ( ) => 'openai' ,
4647 required : true ,
@@ -458,6 +459,41 @@ export const TtsBlock: BlockConfig<TtsBlockResponse> = {
458459 required : false ,
459460 } ,
460461
462+ // Gandr Voice Selection
463+ {
464+ id : 'voice' ,
465+ title : 'Voice' ,
466+ type : 'dropdown' ,
467+ condition : { field : 'provider' , value : 'gandr' } ,
468+ options : [
469+ { label : 'Mia' , id : 'gandr-mia' } ,
470+ { label : 'Ava' , id : 'gandr-ava' } ,
471+ { label : 'Jenny' , id : 'gandr-jenny' } ,
472+ { label : 'Dane' , id : 'gandr-dane' } ,
473+ { label : 'Leo' , id : 'gandr-leo' } ,
474+ { label : 'Lewis' , id : 'gandr-lewis' } ,
475+ ] ,
476+ value : ( ) => 'gandr-mia' ,
477+ dependsOn : [ 'provider' ] ,
478+ required : false ,
479+ } ,
480+
481+ // Gandr Response Format
482+ {
483+ id : 'responseFormat' ,
484+ title : 'Audio Format' ,
485+ type : 'dropdown' ,
486+ condition : { field : 'provider' , value : 'gandr' } ,
487+ options : [
488+ { label : 'MP3' , id : 'mp3' } ,
489+ { label : 'WAV' , id : 'wav' } ,
490+ { label : 'PCM' , id : 'pcm' } ,
491+ ] ,
492+ value : ( ) => 'mp3' ,
493+ dependsOn : [ 'provider' ] ,
494+ required : false ,
495+ } ,
496+
461497 // API Key (common to all providers)
462498 {
463499 id : 'apiKey' ,
@@ -478,6 +514,7 @@ export const TtsBlock: BlockConfig<TtsBlockResponse> = {
478514 'tts_google' ,
479515 'tts_azure' ,
480516 'tts_playht' ,
517+ 'tts_gandr' ,
481518 ] ,
482519 config : {
483520 tool : ( params ) => {
@@ -497,6 +534,8 @@ export const TtsBlock: BlockConfig<TtsBlockResponse> = {
497534 return 'tts_azure'
498535 case 'playht' :
499536 return 'tts_playht'
537+ case 'gandr' :
538+ return 'tts_gandr'
500539 default :
501540 return 'tts_openai'
502541 }
@@ -576,6 +615,14 @@ export const TtsBlock: BlockConfig<TtsBlockResponse> = {
576615 }
577616 }
578617
618+ if ( params . provider === 'gandr' ) {
619+ return {
620+ ...baseParams ,
621+ voice : params . voice ,
622+ responseFormat : params . responseFormat ,
623+ }
624+ }
625+
579626 return baseParams
580627 } ,
581628 } ,
@@ -584,7 +631,7 @@ export const TtsBlock: BlockConfig<TtsBlockResponse> = {
584631 inputs : {
585632 provider : {
586633 type : 'string' ,
587- description : 'TTS provider (openai, deepgram, elevenlabs, cartesia, google, azure, playht)' ,
634+ description : 'TTS provider (openai, deepgram, elevenlabs, cartesia, google, azure, playht, gandr )' ,
588635 } ,
589636 text : { type : 'string' , description : 'Text to convert to speech' } ,
590637 apiKey : { type : 'string' , description : 'Provider API key' } ,
0 commit comments