Vercel AI Gateway、ストリーミング文字起こし対応へ
Vercel の AI Gateway がベータ版としてストリーミング音声転写機能を追加し、リアルタイムキャプションや双方向音声対話の実装を容易にした。
キーポイント
低遅延のリアルタイム転写機能
従来の完全なファイル送信から、音声キャプチャ時にストリーミングし、モデル生成に合わせて逐次テキストを返す方式へ進化。
AI SDK による実装の簡素化
streamTranscribe 関数を使用することで、OpenAI や xAI の異なるプロバイダー間で同じコードでストリーミング転写が可能になる。
エージェントへの音声モード追加
既存のテキストベースのエージェントに、ライブ音声入力をテキストとして渡すことで、変更を加えずに音声対話機能を付与できる。
重要な引用
Now you can stream audio in as it's captured and get transcript updates back as the model produces them, keeping latency low for uses like live captioning and voice input.
The same code works across providers: swap the model string to use xai/grok-stt or any other streaming-capable transcription model.
Streaming transcription also makes it easy to add a voice mode to an agent.
影響分析・編集コメントを表示
影響分析
本ニュースは、リアルタイム音声処理を必要とするアプリケーション(ライブキャプション、音声アシスタント等)の開発コストと遅延課題を解決する重要な進展です。特に、異なるプロバイダー間のモデル切り替えが容易になることで、開発者の柔軟性が向上し、マルチモーダル AI アプリケーションの普及を加速させる可能性があります。
編集コメント
Vercel の AI Gateway が提供するこの機能は、開発者が複雑な音声ストリーミングインフラを構築する手間を省き、より迅速に高品質な音声対話アプリを提供できる環境を整えた点で意義深いです。特にベータ版として早期に利用可能であることは、開発者コミュニティにとって即座の価値をもたらすものです。
AI Gateway にストリーミング文字起こし機能が追加されました。
従来、文字起こしには完全な音声ファイルが必要で、結果は一度に返されていました。しかし今では、録音されたままの音声をストリーム送信し、モデルが生成するたびに文字起こしの更新を受け取ることができます。これによりライブ字幕や音声入力などの用途で遅延を低く抑えることが可能になりました。
ストリーミング文字起こしはベータ版として提供されており、AI SDK の streamTranscribe 関数を通じて、ストリーミング対応の文字起こしモデルであれば利用可能です。
以下の例では、生の PCM オーディオを openai/gpt-realtime-whisper にストリーム送信し、到着するたびに文字起こしの差分(デルタ)を出力しています。結果ストリームには部分的な文字起こしと最終的な文字起こしの両方が含まれます。
同じコードはプロバイダー間で共通して動作します。モデル名を xai/grok-stt や他のストリーミング対応の文字起こしモデルに変更するだけで利用可能です。
ストリーミング文字起こしを使えば、エージェントに音声モードを追加するのも容易です。ユーザーの発話を文字起こしモデルにストリーム送信し、そのリアルタイムテキストをエージェントに渡すだけです。エージェント自体の変更は不要で、依然としてテキストを受け取る仕組みなので、あらゆるテキストベースのエージェントと連携できます。音声で応答するエージェントの場合は、音声生成機能と組み合わせるか、リアルタイム音声を用いて双方向の会話を実現することも可能です。
AI Gateway におけるストリーミング文字起こしに関する詳細は、ドキュメントをご覧ください。
さらに詳しく読む
原文を表示
AI Gateway now supports streaming transcription. Previously, transcription required a complete audio file and returned the full transcript in a single response. Now you can stream audio in as it's captured and get transcript updates back as the model produces them, keeping latency low for uses like live captioning and voice input.
Streaming transcription is in beta and available through the AI SDK's streamTranscribe function with any streaming-capable transcription model.
The example below streams raw PCM audio to openai/gpt-realtime-whisper and prints each transcript delta as it arrives. The result stream also carries partial and final transcripts:
The same code works across providers: swap the model string to use xai/grok-stt or any other streaming-capable transcription model.
Streaming transcription also makes it easy to add a voice mode to an agent. Stream the user's speech to a transcription model and pass the live text to your agent. The agent itself does not change: it still receives text, so this works with any text-based agent. For agents that speak back, pair it with speech generation, or use realtime voice for full two-way conversation.
For more information on streaming transcription on AI Gateway, see the documentation.
Read more
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み