{"record":{"id":"e20f03b380f15212","repo":"FlowiseAI/Flowise","slug":"speech-to-text-is-not-selected-but-found-a-record","errorCode":null,"errorMessage":"Speech to text is not selected, but found a recorded audio file. Please fix the chain.","messagePattern":"Speech to text is not selected, but found a recorded audio file\\. Please fix the chain\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/src/speechToText.ts","lineNumber":130,"sourceCode":"                const groqClient = new Groq({\n                    apiKey: credentialData.groqApiKey\n                })\n                const file = await toFile(audio_file, upload.name)\n                const groqTranscription = await groqClient.audio.transcriptions.create({\n                    file,\n                    model: speechToTextConfig?.model || 'whisper-large-v3',\n                    language: speechToTextConfig?.language,\n                    temperature: speechToTextConfig?.temperature ? parseFloat(speechToTextConfig.temperature) : undefined,\n                    response_format: 'verbose_json'\n                })\n                if (groqTranscription?.text) {\n                    return groqTranscription.text\n                }\n                break\n            }\n        }\n    } else {\n        throw new Error('Speech to text is not selected, but found a recorded audio file. Please fix the chain.')\n    }\n    return undefined\n}\n","sourceCodeStart":112,"sourceCodeEnd":134,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/src/speechToText.ts#L112-L134","documentation":"Thrown by the speech-to-text handler when an incoming request carries a recorded audio file but no speech-to-text node/provider was selected in the chatflow chain. The code reaches the `else` branch only because the upstream component captured audio yet the chain has no STT consumer wired to process it.","triggerScenarios":"A chatflow or agent chain that includes audio recording (e.g. a microphone/upload input producing audio_file) but does not select a SpeechToTextType (OPENAI_WHISPER, AZURE_SPEECH_TO_TEXT, or GROQ_WHISPER). The throw is at speechToText.ts:130.","commonSituations":"Enabling voice input on a chatflow without adding/configuring the speech-to-text node; removing or disabling the STT node while the audio input node remains connected.","solutions":["Add and connect a Speech-to-Text node to the chain and select a provider type.","Provide the required credentials for the chosen STT provider in the node configuration.","If audio input is unintended, remove the audio capture node so no audio_file reaches this handler."],"exampleFix":"// before: chain has audio input node but no STT node\n// after: connect a SpeechToText node and set e.g. type = GROQ_WHISPER with a valid groqApiKey","handlingStrategy":"validation","validationCode":"function assertSttConfigured(audioFile: unknown, sttType: unknown): void {\n  if (audioFile && !sttType) {\n    throw new Error('Audio input present but no Speech-to-Text node is configured in the chain')\n  }\n}\n// call before dispatching audio to the STT handler","typeGuard":"function isSpeechToTextType(v: unknown): v is 'OPENAI_WHISPER' | 'AZURE_SPEECH_TO_TEXT' | 'GROQ_WHISPER' {\n  return typeof v === 'string' && ['OPENAI_WHISPER','AZURE_SPEECH_TO_TEXT','GROQ_WHISPER'].includes(v)\n}","tryCatchPattern":"try {\n  const text = await transcribeAudio(audioFile, sttType, config)\n} catch (e) {\n  if (/Speech to text is not selected/.test(e.message)) {\n    // prompt user to wire an STT node into the chain\n  }\n  throw e\n}","preventionTips":["When adding audio input to a chatflow, always connect a Speech-to-Text node.","Validate chain topology at save time: audio capture requires an STT consumer.","Document the required node pairing for voice flows."],"tags":["flowise","chatflow","audio","configuration"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}