zeroclaw-labs/zeroclaw · error

Failed to build HTTP client for Piper TTS

Error message

Failed to build HTTP client for Piper TTS

What it means

Error "Failed to build HTTP client for Piper TTS" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-channels/src/tts.rs:848

    client: reqwest::Client,
    api_url: String,
}

impl PiperTtsProvider {
    /// Create a new Piper TTS model_provider from config. Falls back to
    /// `http://127.0.0.1:5000/v1/audio/speech` when no `api_url` is supplied.
    pub fn new(alias: &str, config: &TtsProviderConfig) -> Self {
        let api_url = config
            .uri
            .clone()
            .filter(|u| !u.trim().is_empty())
            .unwrap_or_else(|| "http://127.0.0.1:5000/v1/audio/speech".to_string());
        Self {
            alias: alias.to_string(),
            client: reqwest::Client::builder()
                .timeout(TTS_HTTP_TIMEOUT)
                .build()
                .expect("Failed to build HTTP client for Piper TTS"),
            api_url,
        }
    }
}

#[async_trait::async_trait]
impl TtsProvider for PiperTtsProvider {
    fn name(&self) -> &str {
        "piper"
    }

    fn output_format(&self) -> &str {
        // Piper's OpenAI-compatible server returns WAV when no response_format
        // is requested (the body below omits it).
        "wav"
    }

    async fn synthesize(&self, text: &str, voice: &str) -> Result<Vec<u8>> {

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Verify system TLS certificates and HTTP client configuration, then restart the TTS service.
  2. Check proxy/environment settings that could prevent building the HTTP client.

When it happens

Trigger: Thrown at crates/zeroclaw-channels/src/tts.rs:848 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/6268584e99c9a9ef. Report an issue: GitHub.