{"record":{"id":"cedcf9bd04adff88","repo":"n8n-io/n8n","slug":"no-audio-data-returned","errorCode":null,"errorMessage":"No audio data returned","messagePattern":"No audio data returned","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/audio/tts.operation.ts","lineNumber":242,"sourceCode":"\n\tif (options.languageBoost) {\n\t\tbody.language_boost = options.languageBoost;\n\t}\n\n\tconst response = (await apiRequest.call(this, 'POST', '/t2a_v2', {\n\t\tbody,\n\t})) as T2AResponse;\n\n\tif (response.base_resp?.status_code !== 0) {\n\t\tthrow new NodeOperationError(\n\t\t\tthis.getNode(),\n\t\t\t`Text-to-speech failed: ${response.base_resp?.status_msg || 'Unknown error'}`,\n\t\t);\n\t}\n\n\tconst audioData = response.data?.audio;\n\tif (!audioData) {\n\t\tthrow new NodeOperationError(this.getNode(), 'No audio data returned');\n\t}\n\n\tconst jsonData: IDataObject = {\n\t\taudioLength: response.extra_info?.audio_length,\n\t\taudioFormat: response.extra_info?.audio_format,\n\t\taudioSize: response.extra_info?.audio_size,\n\t\twordCount: response.extra_info?.word_count,\n\t\tusageCharacters: response.extra_info?.usage_characters,\n\t};\n\n\tif (downloadAudio) {\n\t\tconst audioResponse = await this.helpers.httpRequest({\n\t\t\tmethod: 'GET',\n\t\t\turl: audioData,\n\t\t\tencoding: 'arraybuffer',\n\t\t\treturnFullResponse: true,\n\t\t});\n","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/audio/tts.operation.ts#L224-L260","documentation":"Thrown when the /t2a_v2 response has a successful status_code (0) but response.data.audio is missing or empty. This is a response-shape inconsistency: MiniMax signalled success yet did not return the synthesized audio payload the node expects.","triggerScenarios":"Transient MiniMax backend glitch returning success without audio; API version change that moved audio bytes to a different field; extremely long input where the service partially failed after marking success; response truncated by an intermediary proxy.","commonSituations":"Rare upstream bug; running against a non-standard base URL (custom proxy/gateway) that strips the data.audio field; stale credentials causing a degraded response; very long text near the limit.","solutions":["Retry the identical request — most occurrences are transient.","Log the full response body to confirm whether data.audio is truly absent vs. moved.","Verify the base URL in credentials points at the official MiniMax endpoint (https://api.minimax.io/v1) and not a filtering proxy.","Shorten input text and retry to rule out a partial-failure edge case."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// There is no caller-side input that prevents an upstream success-with-no-audio glitch.\n// The only meaningful pre-check is to confirm the request shape matches the API contract.\nfunction validateTtsRequestShape(body: IDataObject): string | null {\n  if (typeof body.text !== 'string' || body.text.length === 0) return 'body.text must be a non-empty string';\n  if (typeof body.voice_setting !== 'object' || body.voice_setting === null) return 'body.voice_setting is required';\n  return null;\n}","typeGuard":"function hasAudioPayload(r: unknown): r is { data: { audio: string } } {\n  return typeof (r as { data?: { audio?: unknown } })?.data?.audio === 'string' &&\n    ((r as { data: { audio: string } }).data.audio.length > 0);\n}","tryCatchPattern":"async function ttsWithRetry(apiRequest: any, body: IDataObject, maxAttempts = 3): Promise<T2AResponse> {\n  let lastErr: Error | null = null;\n  for (let attempt = 0; attempt < maxAttempts; attempt++) {\n    const response = (await apiRequest.call(this, 'POST', '/t2a_v2', { body })) as T2AResponse;\n    if (response.base_resp?.status_code !== 0) {\n      throw new NodeOperationError(this.getNode(), `Text-to-speech failed: ${response.base_resp?.status_msg || 'Unknown error'}`);\n    }\n    if (response.data?.audio) return response; // success with payload\n    lastErr = new Error('No audio data returned; retrying');\n    await sleep(1000 * (attempt + 1));\n  }\n  throw new NodeOperationError(this.getNode(), lastErr?.message ?? 'No audio data returned');\n}","preventionTips":["Treat success-without-audio as transient and retry with backoff before failing the run.","Log the full response body when it happens so you can distinguish a real API change from a glitch.","Point credentials at the official MiniMax base URL to avoid proxies that strip fields.","Keep inputs within documented limits to reduce the chance of partial server-side failure."],"tags":["minimax","tts","response-shape","transient"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}