Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问clear审计通过

assemblyai-streaming装配 AI 流

Agent Skill

assemblyai-streaming 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

661

周安装

27

GitHub Stars

35

下载量

212
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:assemblyai-streaming(装配 AI 流)
来源仓库:https://github.com/ratacat/claude-skills
仓库路径:skills/assemblyai-streaming
安装命令:
npx skills add https://github.com/ratacat/claude-skills --skill assemblyai-streaming
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/ratacat/claude-skills --skill assemblyai-streaming

简介

assemblyai-streaming 用于构建实时语音转录与 LLM 网关集成应用。

  • 适用于会议纪要、语音客服与实时翻译等高时效性语音处理场景。
  • 它支持 WebSocket 流式传输与异步补全两种模式,灵活应对不同带宽条件。
  • 输出包含转录结果后处理建议,如关键词提取与摘要生成等增值功能扩展。
  • 高并发时应考虑连接池管理与背压控制,防止服务端过载导致服务降级。

SKILL.md

AssemblyAI Streaming & Live Transcription Skill

Overview

Use this skill to build and maintain code that talks to AssemblyAI’s:

  • Streaming Speech-to-Text (STT) via WebSockets (wss://streaming.assemblyai.com/v3/ws)
  • Async / pre-recorded STT via REST (https://api.assemblyai.com/v2/transcript)
  • LLM Gateway for applying Claude/GPT/Gemini-style models to transcripts (https://llm-gateway.assemblyai.com)

The emphasis is on streaming/live transcription, meeting notetakers, and voice agents, while still covering async workflows and post-processing.

This skill assumes a Claude Code environment with access to Python (preferred) and Bash.


When to Use

Use this skill when:

  • Implementing real-time transcription from a microphone, telephony stream, or audio file.
  • Building a live meeting notetaker (Zoom/Teams/Meet), especially with summaries, action items, and highlights.
  • Implementing a voice agent where latency and natural turn-taking matter.
  • Migrating from other STT providers (OpenAI/Deepgram/Google/AWS/etc.) to AssemblyAI.
  • Applying LLMs to audio via LLM Gateway for summaries, Q&A, topic tagging, or custom prompts.

Do not use this skill when:

  • The task is generic HTTP client usage with no AssemblyAI-specific logic.
  • The request clearly targets a different STT vendor.
  • The environment cannot safely store or use an API key.

AssemblyAI Mental Model

1. Products to care about

  1. Pre-recorded Speech-to-Text (Async)

- REST API: POST /v2/transcriptGET /v2/transcript/{id} - Designed for files from URLs, uploads, S3, etc. - Supports extra models: summarization, topic detection, sentiment, PII redaction, chapters, etc.

  1. Streaming Speech-to-Text

- WebSocket: wss://streaming.assemblyai.com/v3/ws - Low-latency, immutable transcripts (~300ms). - Turn detection built in; fits voice agents and live captioning.

  1. LLM Gateway

- REST API: POST /v1/chat/completions at https://llm-gateway.assemblyai.com - Unified access to multiple LLMs (Claude, GPT, Gemini, etc.). - Designed for “LLM over transcripts” workflows.

2. Key model knobs (Async)

  • speech_models: ["slam-1", "universal"] etc.

- Slam-1: best English accuracy + keyterms_prompt, good for medical/technical conversations. - Universal: multilingual coverage; good default if language is unknown.

  • language_code vs language_detection:

- Use language_code when the language is known. - Use language_detection: true when unknown; optionally set language_confidence_threshold.

  • keyterms_prompt:

- Domain words/phrases to boost (med terms, product names, etc.).

  • Extra intelligence: summarization, iab_categories, content_safety, entity_detection, auto_chapters, sentiment_analysis, speaker_labels, auto_highlights, redact_pii, etc.

3. Key model knobs (Streaming)

Connection URL:

  • US: wss://streaming.assemblyai.com/v3/ws
  • EU: wss://streaming.eu.assemblyai.com/v3/ws

Important query parameters:

  • sample_rate (required): e.g. 16000
  • format_turns (bool): return formatted final transcripts; avoid for low-latency voice agents.
  • speech_model: universal-streaming-english (default) or universal-streaming-multi.
  • `keyterms_p

rompt: JSON-encoded list of terms, e.g.["AssemblyAI", "Slam-1", "Keanu Reeves"]`.

  • Turn detection:

- end_of_turn_confidence_threshold (0.0–1.0, default ~0.4) - min_end_of_turn_silence_when_confident (ms, default ~400) - max_turn_silence (ms, default ~1280)

Headers:

  • Use either Authorization: <API_KEY> or a short-lived token query parameter issued by your backend.

Messages:

  • Client sends:

- Binary audio chunks (50–1000ms each). - Optional JSON messages: {"type": "UpdateConfig",...}, {"type": "Terminate"}, {"type": "ForceEndpoint"}.

  • Server sends:

- Begin event with id, expires_at. - Turn events with: - transcript (immutable partials/finals), - utterance (complete semantic chunk), - end_of_turn (bool), - turn_is_formatted (bool), - words array with timestamps/confidences. - Termination event with summary stats.

4. Regions and data residency

  • Async:

- US: https://api.assemblyai.com - EU: https://api.eu.assemblyai.com

  • Streaming:

- US: wss://streaming.assemblyai.com/v3/ws - EU: wss://streaming.eu.assemblyai.com/v3/ws

Always keep base URLs consistent per project; don’t mix US/EU endpoints for the same data.


Security & API Keys

  • Always require an AssemblyAI API key and keep it out of source in Claude Code output:

- Use environment variables: ASSEMBLYAI_API_KEY. - Or placeholders ("<YOUR_API_KEY>") in snippets.

  • For browser/client code:

- Do not embed the API key. - Instruct the user to generate temporary streaming tokens on their backend and pass only the token into the WebSocket connection.

  • Never print real keys in logs or comments.

High-Level Workflow Patterns

Decision tree

  1. Is the audio live?

- Yes → Use Streaming STT. - No → Use Async STT.

  1. Is latency critical (<1s) for responses?

- Yes → Streaming with format_turns=false and careful turn detection. - No → Async, then Summarization/Chapters/etc.

  1. Do transcripts leave the backend?

- Yes → Consider redact_pii (and optionally redact_pii_audio) before sharing. - No → Use raw transcripts as needed.

  1. Need LLM-based processing (Q&A, structured summaries)?

- Yes → Pipe transcripts into LLM Gateway via chat/completions.


How Claude Should Work with This Skill

General principles

  • Prefer official AssemblyAI SDKs (Python/JS) when available; fall back to requests/websocket-client only if SDK cannot be installed.
  • Always:

- Validate HTTP responses and WebSocket status. - Surface useful error messages (status, error fields in transcript JSON). - Respect documented min/max chunk sizes (50–1000ms of audio per binary message).

  • For voice-agent code, optimize for:

- Immutable partials (transcript) and utterance field. - Minimal latency, avoid extra formatting passes.


Recipe 1 – Minimal Streaming from Microphone (Python SDK)

Goal: Stream mic audio to AssemblyAI and print transcripts in real time.

Use this when the environment has Python and assemblyai + pyaudio installed, and the user wants a quick streaming demo.

import assemblyai as aai
from assemblyai.streaming import v3 as aai_stream
import pyaudio

API_KEY = "<YOUR_API_KEY>"

aai.settings.api_key = API_KEY

SAMPLE_RATE = 16000
CHUNK_MS = 50
FRAMES_PER_BUFFER = int(SAMPLE_RATE * (CHUNK_MS / 1000.0))

def main():
    client = aai_stream.StreamingClient(
        aai_stream.StreamingClientOptions(
            api_key=API_KEY,
            api_host="streaming.assemblyai.com",  # or "streaming.eu.assemblyai.com"
        )
    )

    def on_begin(_client, event: aai_stream.BeginEvent):
        print(f"Session started: {event.id}, expires at {event.expires_at}")

    def on_turn(_client, event: aai_stream.TurnEvent):
        # Use immutable transcript text
        text = (event.transcript or "").strip()
        if not text:
            return
        # Use formatted finals only for display; keep unformatted for LLMs
        if event.turn_is_formatted:
            print(f"[FINAL] {text}")
        else:
            print(f"[PARTIAL] {text}", end="\r")

    def on_terminated(_client, event: aai_stream.TerminationEvent):
        print(f"\nTerminated. Audio duration={event.audio_duration_seconds}s")

    def on_error(_client, error: aai_stream.StreamingError):
        print(f"\nStreaming error: {error}")

    client.on(aai_stream.StreamingEvents.Begin, on_begin)
    client.on(aai_stream.StreamingEvents.Turn, on_turn)
    client.on(aai_stream.StreamingEvents.Termination, on_terminated)
    client.on(aai_stream.StreamingEvents.Error, on_error)

    client.connect(
        aai_stream.StreamingParameters(
            sample_rate=SAMPLE_RATE,
            format_turns=False,  # better latency for voice agents
        )
    )

    pa = pyaudio.PyAudio()
    stream = pa.open(
        format=pyaudio.paInt16,
        channels=1,
        rate=SAMPLE_RATE,
        input=True,
        frames_per_buffer=FRAMES_PER_BUFFER,
    )

    try:
        print("Speak into your microphone (Ctrl+C to stop)...")
        def audio_gen():
            while True:
                yield stream.read(FRAMES_PER_BUFFER, exception_on_overflow=False)
        client.stream(audio_gen())
    except KeyboardInterrupt:
        pass
    finally:
        client.disconnect(terminate=True)
        stream.stop_stream()
        stream.close()
        pa.terminate()

if __name__ == "__main__":
    main()

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

25.58%
按下载量换算54

trae

25.2%
按下载量换算53

Antigravity

15.59%
按下载量换算33

windsurf

12.17%
按下载量换算26

Codex

8%
按下载量换算17

OpenCode

3.73%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills