xtekky/gpt4free · critical · Error

No audio chunks

Error message

No audio chunks

What it means

extractEmbedded walks the go:embed FS (embed/<os>/...) looking for a runtime zip for the current platform and found zero entries (or the walk itself failed). The binary was built without embedding a python runtime archive for this os/arch, typically because fetch-python.sh was never run before 'go build'.

Source

Thrown at g4f/Provider/audio/ElevenLabs.py:191

    let buf = '', chunks = [];
    while (true) {{
        const {{done, value}} = await reader.read();
        if (done) break;
        buf += dec.decode(value, {{stream: true}});
        const lines = buf.split('\\n');
        buf = lines.pop() || '';
        for (const ln of lines) {{
            const t = ln.trim();
            if (!t) continue;
            // Accept both plain NDJSON and SSE "data:" prefixed lines
            const d = t.startsWith('data:') ? t.slice(5).trim() : t;
            try {{
                const p = JSON.parse(d);
                if (p.audio_base64) chunks.push(p.audio_base64);
            }} catch (e) {{}}
        }}
    }}
    if (!chunks.length) throw new Error('No audio chunks');
    return chunks;
}})()"""

View on GitHub (pinned to 973504e177)

Solutions

  1. Run fetch-python.sh for the target platform and rebuild the binary so embed/<os>/<archive>.zip is present at compile time
  2. Verify the embedded FS layout: embed/<os>/<os>-<arch>-embed-<ver>.zip must exist and match the go:embed pattern used by embedRuntimeArchive
  3. If the fetch script failed, fix its failure (network, checksum) first — this error is downstream of a missing file, not an independent bug
  4. For cross-compilation, fetch the archive for GOOS/GOARCH you target, not the build host
Defensive patterns

Strategy: validation

Validate before calling

// at build/packaging time, assert the embed is populated:
// go:embed embed/*/*.zip
// then in CI: test -n "$(ls embed/*/*.zip)" || { echo 'run fetch-python.sh'; exit 1; }

Prevention

When it happens

Trigger: Running a binary built on a machine where embed/<os>/ contained no <os>-<arch>-embed-<ver>.zip (fetch-python.sh skipped or failed); cross-compiling to an os/arch whose archive was never fetched; the embed directive pattern not matching the fetched archive name.

Common situations: CI builds that skip the fetch step to save time; developers building from a fresh clone without reading the bootstrap docs; release binaries accidentally built before fetch-python.sh completed; platform matrix gaps (e.g. android or arm64 archive missing).

Related errors


AI-assisted analysis of xtekky/gpt4free@973504e177 (2026-08-14). Data as JSON: /api/errors/68ee7b8dcf2946c6. Report an issue: GitHub.