{"record":{"id":"00cbd927ad741f4a","repo":"FlowiseAI/Flowise","slug":"unsupported-tts-provider-provider","errorCode":null,"errorMessage":"Unsupported TTS provider: ${provider}","messagePattern":"Unsupported TTS provider: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/src/textToSpeech.ts","lineNumber":238,"sourceCode":"            const client = new ElevenLabsClient({\n                apiKey: credentialData.elevenLabsApiKey\n            })\n\n            const voices = await client.voices.search({\n                pageSize: 100,\n                voiceType: 'default',\n                category: 'premade'\n            })\n\n            return voices.voices.map((voice) => ({\n                id: voice.voiceId,\n                name: voice.name,\n                category: voice.category\n            }))\n        }\n\n        default:\n            throw new Error(`Unsupported TTS provider: ${provider}`)\n    }\n}\n","sourceCodeStart":220,"sourceCodeEnd":241,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/src/textToSpeech.ts#L220-L241","documentation":"Thrown by the default case of a switch on provider inside getVoices(). It fires when the provider string does not match any known TextToSpeechType enum member (e.g. PLAYHT_TTS, OPENAI_TTS, ELEVEN_LABS_TTS). It indicates an unknown or unsupported TTS provider value reached voice enumeration.","triggerScenarios":"The chatflow TTS config holds a provider string that isn't in the TextToSpeechType enum (typo, stale value from an older Flowise version, or a provider whose support was removed); an empty/undefined provider passed because the config was only partially saved; a custom provider string injected via API without enum validation.","commonSituations":"Migrating a chatflow from an older Flowise version that supported a provider since removed; manually editing the chatflow JSON with a misspelled provider; third-party plugin registering a provider name that this build doesn't recognise.","solutions":["Inspect textToSpeechConfig / the chatflow node data to see the actual provider string being passed.","Compare the value against the TextToSpeechType enum values in the codebase and correct the config to a supported provider.","Add the missing provider as a new case if you are extending TTS support.","If the value is empty/undefined, reconfigure the TTS node in the chatflow editor."],"exampleFix":"// before — only known providers, default throws\nswitch (provider) {\n  case TextToSpeechType.OPENAI_TTS: { ... }\n  case TextToSpeechType.ELEVEN_LABS_TTS: { ... }\n  default: throw new Error(`Unsupported TTS provider: ${provider}`)\n}\n\n// after — validate upstream and surface allowed values\nconst ALLOWED = Object.values(TextToSpeechType)\nif (!ALLOWED.includes(provider)) {\n  throw new Error(`Unsupported TTS provider: \"${provider}\". Supported: ${ALLOWED.join(', ')}`)\n}","handlingStrategy":"validation","validationCode":"import { TextToSpeechType } from './textToSpeech'\nconst ALLOWED_PROVIDERS = new Set(Object.values(TextToSpeechType))\nfunction isValidTtsProvider(p: unknown): p is string {\n  return typeof p === 'string' && ALLOWED_PROVIDERS.has(p as any)\n}","typeGuard":"function isSupportedTtsProvider(provider: unknown): provider is (typeof TextToSpeechType)[keyof typeof TextToSpeechType] {\n  return typeof provider === 'string' && provider in TextToSpeechType\n}","tryCatchPattern":"if (!isSupportedTtsProvider(provider)) {\n  throw new Error(`Unsupported TTS provider: \"${String(provider)}\". Supported: ${[...ALLOWED_PROVIDERS].join(', ')}`)\n}","preventionTips":["Validate the provider against the enum before the switch.","Re-validate stored chatflow provider values after Flowise upgrades (provider may have been removed).","Expose the list of supported providers to the UI so users can't type free-text values."],"tags":["tts","validation","config","enum","switch-default"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}