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

AssemblyAI

Streaming speech-to-text with AssemblyAI Universal-Streaming (v3), plus the sync HTTP service.

Overview

pipedog ports both of Pipecat's AssemblyAI speech-to-text services:

  • AssemblyAISTTService: Universal-Streaming v3 over a WebSocket, with turn detection, keyterms, diarization, language detection and hot-updatable settings.
  • AssemblyAISyncSTTService: AssemblyAI's sync HTTP API for segmented (VAD-bounded) audio, with optional pre-warming and conversation context.

The same package has AssemblyAI's text-to-speech service.

Installation

bun add @pipedog/assemblyai

Prerequisites

  • An AssemblyAI account and API key, passed as apiKey (the examples read ASSEMBLYAI_API_KEY).

AssemblyAISTTService

Configuration

Prop

Type

Settings

Runtime-updatable settings, passed as settings: new AssemblyAISTTService.Settings({...}). Settings you leave out keep their defaults.

SettingTypeDefaultDescription
modelstring"universal-3-6-pro"Speech model.
language / languageCode / languageCodesLanguage / string / Language[]Language selection.
formatTurnsbooleanReturn formatted final turns.
endOfTurnConfidenceThresholdnumberEnd-of-turn confidence.
minTurnSilence / maxTurnSilencenumberSilence bounds, in ms.
keytermsPrompt / promptstring[] / stringVocabulary boosting and prompting.
speakerLabelsbooleanSpeaker diarization.
vadThresholdnumberServer VAD threshold.
agentContext, previousContextNTurnsConversation context (updateAgentContext(text) updates it live).

More (languageDetection, domain, voiceFocus, mode, ...) are listed on AssemblyAISTTSettings.

Usage

stt.ts
import { AssemblyAISTTService } from "@pipedog/assemblyai/stt";
import { STTUpdateSettingsFrame } from "@pipedog/core/frames/frames";
import { Language } from "@pipedog/core/transcriptions/language";

const stt = new AssemblyAISTTService({
  apiKey: process.env.ASSEMBLYAI_API_KEY ?? "",
  settings: new AssemblyAISTTService.Settings({
    model: "universal-3-6-pro",
    keytermsPrompt: ["pipedog", "Pipecat"],
    languageCodes: [Language.EN, Language.ES],
  }),
});

Notes

  • Emits InterimTranscriptionFrame for partial turns and TranscriptionFrame for final turns; fires on_end_of_turn.
  • With vadForceTurnEndpoint (default), a VAD stop sends ForceEndpoint.

Update settings mid-call; fields AssemblyAI supports are sent as UpdateConfiguration without reconnecting:

// Hot-updatable settings apply without reconnecting.
const update = new STTUpdateSettingsFrame({
  delta: new AssemblyAISTTService.Settings({ languageCodes: [Language.ES] }),
});

AssemblyAISyncSTTService

Configuration

Prop

Type

Settings

Runtime-updatable settings, passed as settings: new AssemblyAISyncSTTService.Settings({...}). Settings you leave out keep their defaults.

SettingDescription
prompt, keytermsPromptPrompting and vocabulary boosting.
conversationContextPrior turns sent as context.
languageCodesLanguage selection.
timestampsRequest word timestamps.

Notes

  • Pass fetch to use your own HTTP client; warm() and enablePrewarming call /v1/warm.

Runtimes

RuntimeWorksWhat it needs
Bun✅ yesNothing.
Node.js✅ yesNothing.
Deno✅ yesNothing.
Cloudflare Workers✅ yesNothing.

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

The service uses fetch and the global WebSocket (through core's websocketConnect, which sends the auth header on the handshake on Cloudflare Workers too). Pass no SDK; nothing is Node-only. The Sync service uses fetch only.

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