
deepgram-js-speech-to-text
Use when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram Speech-to-Text v1 (/v1/listen) for prerecorded or live audio transcription. Covers client.listen.v1.media.transcribeUrl / transcribeFile (REST) plus client.listen.v1.createConnection() / connect() (WebSocket). Use deepgram-js-audio-intelligence for summarize/sentiment/topics/diarize overlays, deepgram-js-conversational-stt for Flux turn-taking on /v2/listen, and deepgram-js-voice-agent for full-duplex assistants. Triggers include "transcribe", "speech to text", "STT", "listen.v1", "nova-3", "live transcription", and "websocket transcription".
- Installs
- 81
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/deepgram/deepgram-js-sdk --skill deepgram-js-speech-to-text- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads deepgram-js-speech-to-text automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Using Deepgram Speech-to-Text (JavaScript / TypeScript SDK)
Basic transcription for prerecorded audio (REST) or live audio (WebSocket) via /v1/listen.
When to use this product
- REST (
client.listen.v1.media.transcribeUrl/transcribeFile) — one-shot transcription of a finished URL or file. Good for batch jobs, caption generation, offline processing. - WebSocket (
client.listen.v1.createConnection()/connect()) — continuous streaming transcription. Good for live captions, microphone audio, telephony streams, browser or Node realtime apps.
Use a different skill when:
- You also want summaries, topics, intents, sentiment, language detection, or redaction guidance on the same
/v1/listencall →deepgram-js-audio-intelligence. - You need Flux turn-taking and end-of-turn events on
/v2/listen→deepgram-js-conversational-stt. - You need a full interactive assistant with STT + LLM + TTS over one socket →
deepgram-js-voice-agent.
Authentication
require("dotenv").config();
const { DeepgramClient } = require("@deepgram/sdk");
const deepgramClient = new DeepgramClient({
apiKey: process.env.DEEPGRAM_API_KEY,
});
Use the exported DeepgramClient from src/CustomClient.ts, not DefaultDeepgramClient. The wrapper adds the required Token auth prefix, session headers, and patched WebSocket behavior.
Quick start — REST (prerecorded URL)
From examples/04-transcription-prerecorded-url.ts:
const data = await deepgramClient.listen.v1.media.transcribeUrl({
url: "https://dpgr.am/spacewalk.wav",
model: "nova-3",
language: "en",
punctuate: true,
paragraphs: true,
utterances: true,
});
console.log(
"Transcription:",
data.results?.channels?.[0]?.alternatives?.[0]?.transcript,
);
Quick start — REST (prerecorded file)
From examples/05-transcription-prerecorded-file.ts:
const { createReadStream } = require("fs");
const data = await deepgramClient.listen.v1.media.transcribeFile(
createReadStream("./examples/spacewalk.wav"),
{
model: "nova-3",
language: "en",
punctuate: true,
paragraphs: true,
utterances: true,
smart_format: true,
}
);
transcribeFile(...) accepts multiple upload shapes in this SDK: fs.ReadStream, Buffer, ReadableStream, Blob, File, ArrayBuffer, and Uint8Array (see examples/23-file-upload-types.ts).
Quick start — WebSocket (live streaming)
From examples/07-transcription-live-websocket.ts:
const deepgramConnection = await deepgramClient.listen.v1.createConnection({
model: "nova-3",
language: "en",
punctuate: "true",
interim_results: "true",
});
deepgramConnection.on("message", (data) => {
if (data.type === "Results") {
console.log("Transcript:", data);
}
});
deepgramConnection.connect();
await deepgramConnection.waitForOpen();
// Swap this for a mic capture (e.g. `node-microphone` / `MediaRecorder`)
// in real apps; the repo examples use `createReadStream` over a sample WAV.
const { createReadStream } = require("node:fs");
const audioStream = createReadStream("samples/spacewalk.wav");
audioStream.on("data", (chunk) => {
deepgramConnection.sendMedia(chunk);
});
audioStream.on("end", () => {
deepgramConnection.sendFinalize({ type: "Finalize" });
});
The repo examples use the two-step socket flow: createConnection() → register handlers → connect() → waitForOpen().
Key parameters / API surface
- REST:
model,language,punctuate,smart_format,paragraphs,utterances,multichannel,numerals,search,keyterm,keywords,encoding,sample_rate,callback,tag. - WSS connect args (
src/api/resources/listen/resources/v1/client/Client.ts):modelis required; common realtime flags includelanguage,interim_results,endpointing,utterance_end_ms,vad_events,encoding,sample_rate,multichannel,punctuate,smart_format. - WSS client messages (
src/api/resources/listen/resources/v1/client/Socket.ts):sendMedia(...),sendFinalize(...),sendCloseStream(...),sendKeepAlive(...). - WSS server events:
Results,Metadata,UtteranceEnd,SpeechStarted.
API reference (layered)
- In-repo reference:
reference.md→Listen V1 Mediafor REST; WSS behavior lives insrc/CustomClient.tsandsrc/api/resources/listen/resources/v1/client/{Client,Socket}.ts. - Canonical OpenAPI (REST): https://developers.deepgram.com/openapi.yaml
- Canonical AsyncAPI (WSS): https://developers.deepgram.com/asyncapi.yaml
- Context7: library ID
/llmstxt/developers_deepgram_llms_txt - Product docs:
Gotchas
- Use
DeepgramClient, notDefaultDeepgramClient. The custom wrapper addsTokenauth, session IDs, browser WS auth protocols, and patched sockets. - Repo examples are two-stage for WSS.
createConnection()does not open the socket; callconnect()and usuallywaitForOpen(). - Finalize before closing v1 streams.
sendFinalize({ type: "Finalize" })flushes the final partial. - Keep idle streams alive. Use audio or
sendKeepAlive({ type: "KeepAlive" })on long pauses. - Raw audio metadata must match reality. If you send PCM,
encodingandsample_ratemust match the bytes. - Browser auth differs from Node auth. In browsers, the wrapper moves auth/session info into WebSocket subprotocols because custom headers are unavailable.
- Use
/v2/listenonly for Flux. If you need turn-aware conversational STT, switch skills instead of forcing v1.
Example files in this repo
examples/04-transcription-prerecorded-url.tsexamples/05-transcription-prerecorded-file.tsexamples/06-transcription-prerecorded-callback.tsexamples/07-transcription-live-websocket.tsexamples/08-transcription-captions.tsexamples/23-file-upload-types.tsexamples/27-deepgram-session-header.ts
Central product skills
For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:
npx skills add deepgram/skills
This SDK ships language-idiomatic code skills; deepgram/skills ships cross-language product knowledge (see api, docs, recipes, examples, starters, setup-mcp).
FAQ
What does the deepgram-js-speech-to-text skill do?
Use when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram Speech-to-Text v1 (/v1/listen) for prerecorded or live audio transcription. Covers client.listen.v1.media.transcribeUrl / transcribeFile (REST) plus client.listen.v1.createConnection() / connect() (WebSocket). Use deepgram-js-audio-intelligence for summarize/sentiment/topics/diarize overlays, deepgram-js-conversational-stt for Flux turn-taking on /v2/listen, and deepgram-js-voice-agent for full-duplex assistants. Triggers include "transcribe", "speech to text", "STT", "listen.v1", "nova-3", "live transcription", and "websocket transcription".
How do I install deepgram-js-speech-to-text?
Run npx skills add https://github.com/deepgram/deepgram-js-sdk --skill deepgram-js-speech-to-text in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/deepgram-js-speech-to-text/ (personal) or .claude/skills/deepgram-js-speech-to-text/ (project).
Which AI agents can use deepgram-js-speech-to-text?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is deepgram-js-speech-to-text safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains deepgram-js-speech-to-text?
It is published by deepgram in deepgram/deepgram-js-sdk, and it is an official skill from the maker of the technology it covers. It has 81 recorded installs.
More from deepgram/deepgram-js-sdk
deepgram-js-conversational-stt
deepgram/deepgram-js-sdk
Open the skill to read its SKILL.md instructions.
deepgram-js-text-to-speech
deepgram/deepgram-js-sdk
Use when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram Text-to-Speech v1 (/v1/speak) for audio synthesis. Covers one-shot REST via client.speak.v1.audio.generate and streaming WebSocket via client.speak.v1.createConnection() / connect(). Use deepgram-js-voice-agent when you need full-duplex STT + LLM + TTS instead of one-way synthesis. Triggers include "TTS", "text to speech", "speak", "aura", "streaming TTS", and "speak.v1".
deepgram-js-audio-intelligence
deepgram/deepgram-js-sdk
Use when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram audio analytics overlays on /v1/listen - summarize, topics, intents, sentiment, diarize, redact, detectlanguage, and entity detection. Same endpoint as plain STT, different params. Covers REST via client.listen.v1.media.transcribeUrl / transcribeFile and the WebSocket-supported subset on client.listen.v1.createConnection() / connect(). Use deepgram-js-speech-to-text for plain transcription and deepgram-js-text-intelligence for analytics on already-transcribed text. Triggers include "audio intelligence", "summarize audio", "diarize", "sentiment from audio", "redact PII", and "detect language audio".
deepgram-js-management-api
deepgram/deepgram-js-sdk
Use when writing or reviewing JavaScript/TypeScript in this repo that calls Deepgram Management APIs for projects, API keys, members, invites, requests, usage, billing, models, and agent think-model discovery. Covers client.manage.v1. plus client.agent.v1.settings.think.models.list(). Use deepgram-js-voice-agent when you want to run an agent live rather than administer projects or inspect models. Triggers include "management API", "list projects", "API keys", "members", "invites", "usage stats", "billing", "list models", and "manage.v1".
deepgram-js-voice-agent
deepgram/deepgram-js-sdk
Use when writing or reviewing JavaScript/TypeScript in this repo that builds an interactive voice agent via agent.deepgram.com/v1/agent/converse. Covers client.agent.v1.createConnection() / connect(), sendSettings, sendMedia, runtime updates, event handling, and function-call responses. Use deepgram-js-text-to-speech for one-way synthesis, deepgram-js-speech-to-text or deepgram-js-conversational-stt for transcription only, and deepgram-js-management-api for project/model admin rather than live agent runtime. Triggers include "voice agent", "agent converse", "full duplex", "barge-in", "function calling", and "agent.v1".
Popular media & creative skills
hyperframes
heygen-com/hyperframes
Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.
media-use
heygen-com/hyperframes
Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
hyperframes-registry
heygen-com/hyperframes
About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.
hyperframes-creative
heygen-com/hyperframes
Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.
ai-video-generation
101-skills/superpowers
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse
ai-image-generation
101-skills/superpowers
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image