pipedog is an unofficial community port of Pipecat, not affiliated with Daily.
pipedog
Speech-to-text

Meta

Realtime speech-to-text with MetaSTTService, over Meta's Muse Voice WebSocket API.

Overview

  • MetaSTTService: streams audio over a WebSocket to Meta's realtime transcription endpoint. Cumulative partials become InterimTranscriptionFrames; the post-processed text of each segment becomes a TranscriptionFrame.

Installation

bun add @pipedog/meta
import { MetaSTTService } from "@pipedog/meta/stt";

Prerequisites

  • A Meta Model API key from Meta's developer site.
  • Pass the key as apiKey. The examples read it from META_API_KEY.

MetaSTTService

Connects to wss://api.meta.ai/v1/asr/realtime. The key travels in the handshake message as a Bearer token, not in an HTTP header, and the session's configuration is fixed once the server accepts it, so a settings change reconnects.

Configuration

Prop

Type

Settings

Runtime-updatable settings, passed as settings: new MetaSTTService.Settings({...}) (MetaSTTSettings). Any setting you leave out keeps the default below.

SettingTypeDefaultDescription
modelstring"muse-voice-transcribe-1.0"Transcription model.
languageLanguage | nullLanguage.ENLanguage to bias recognition toward. Leave it and languageBias unset to auto-detect.
languageBiasLanguage[] | nullnullLanguages to bias toward, for speech that switches between them. Replaces language when set.
modestring"ENDPOINTING""ENDPOINTING" (the model marks turn boundaries), "PUSH_TO_TALK" or "DIARIZATION".
keywordsstring[] | nullnullTerms to bias recognition toward. Biasing doesn't guarantee a spelling.
emitAudioProgressbooleanfalseHave the server report progress for every processed audio chunk.
zdrOverrideboolean | nullnulltrue forces metadata-only logging; false allows content retention; null uses the account's setting.

Usage

stt.ts
import { Language } from "@pipedog/core/transcriptions/language";
import { MetaSTTService } from "@pipedog/meta/stt";

const stt = new MetaSTTService({
  apiKey: process.env.META_API_KEY ?? "",
  settings: new MetaSTTService.Settings({ language: Language.EN, keywords: ["pipedog"] }),
});

Event handlers

EventDescription
on_connectedThe WebSocket connected.
on_disconnectedThe WebSocket closed.

Notes

  • Audio is sent at 24000 Hz, or 16000 Hz for any other pipeline rate (resampled), the only two rates the API accepts.
  • The server's turn boundaries only segment transcripts. The VAD and turn strategies still decide when the user's turn ends.
  • Sessions are capped at 60 minutes. The server then closes the socket, and the service reconnects into a fresh one.
RuntimeWorksWhat it needs
Bun✅ yesNothing.
Node.js✅ yesNothing.
Deno✅ yesNothing.
Cloudflare Workers✅ yesNothing.

Generated from pipecat.runtimes and pipecat.compat in packages/meta/package.json: ✅ means the compat smoke test passes on that runtime.

Runtime notes

  • The WebSocket goes through the core websocketConnect. It works on Bun, Node, Deno and Cloudflare Workers.
  • Tested against local WebSocket servers, as upstream's tests do, not against Meta itself.

pipedog is an unofficial community TypeScript port of Pipecat. It is not affiliated with or endorsed by Daily or the Pipecat project.

Portions adapted from the Pipecat documentation, Copyright (c) 2024–2025 Daily, BSD-2-Clause (see apps/docs/LICENSE-pipecat-docs).

On this page