SuperAPI AI 工具集

deepgram-migration-deep-dive

智能体与模型

查看项目

更新于 10-15 22:42

技能介绍

用途:指导把现有语音转写流程从 AWS Transcribe、Google Cloud Speech-to-Text、Azure Cognitive Services 或 OpenAI Whisper 迁移到 Deepgram,核心是适配器模式加统一接口,配合并行运行、按百分比切流和自动回滚。

主要能力:提供 TranscriptionAdapter 统一接口(transcribeUrl、transcribeFile、name)与 TranscriptionResult 结构;给出 Deepgram 适配器(createClient、listen.prerecorded.transcribeUrl/transcribeFile,默认 model 为 nova-3,支持 smart_format、diarize、language、keywords、redact)与 AWS Transcribe 旧适配器示例;MigrationRouter 按百分比在 Deepgram 与旧服务间分流;validateMigration 用 Jaccard 相似度对比新旧转写并统计耗时与置信度。

功能映射要点:AWS 的 LanguageCode 对应 language(ISO 639-1 两位);ShowSpeakerLabels 对应 diarize;VocabularyName 对应 keywords 内联加权;ContentRedactionType 对应 redact;OutputBucketName 对应 callback;AWS 为轮询异步,Deepgram 为同步响应或回调。Google STT 的 encoding 与 sampleRateHertz 由 Deepgram 自动检测,model 由 latest_long 映射为 nova-3,StreamingRecognize 对应 listen.live()。Whisper 本地 GPU 处理改为 API 调用,whisper.transcribe 对应 listen.prerecorded.transcribeFile,且 Deepgram 支持 diarize 与流式。

使用方式:先盘点现有音频与转写流程、数据留存与同意义务、评测样本和回滚负责人,准备独立凭据的预发环境与验收阈值;在非敏感样本上并行跑新旧流程,比较准确率、延迟与错误指标,验收通过后再做小比例可回滚灰度。回滚可调用 router.setDeepgramPercent(0)。

限制:资料未提供具体价格、性能倍数与平台支持细节;示例中的 10-100x 更快等表述仅为资料原文,未经验证;迁移前不得批量重处理客户录音,须等观察窗口结束。