跳至主要內容

Deepgram

LiteLLM 支援 Deepgram 的 /listen 端點。

屬性詳細資訊
說明Deepgram 的語音 AI 平台提供語音轉文字、文字轉語音,以及語言理解的 API。
LiteLLM 上的提供者路由deepgram/
提供者文件Deepgram ↗
支援的 OpenAI 端點/audio/transcriptions

快速開始

from litellm import transcription
import os

# set api keys
os.environ["DEEPGRAM_API_KEY"] = ""
audio_file = open("/path/to/audio.mp3", "rb")

response = transcription(model="deepgram/nova-2", file=audio_file)

print(f"response: {response}")

LiteLLM Proxy 使用方式

將模型加入設定

  1. 將模型加入 config.yaml
model_list:
- model_name: nova-2
litellm_params:
model: deepgram/nova-2
api_key: os.environ/DEEPGRAM_API_KEY
model_info:
mode: audio_transcription

general_settings:
master_key: sk-1234

啟動 proxy

litellm --config /path/to/config.yaml 

# RUNNING on http://0.0.0.0:4000

測試

curl --location 'http://0.0.0.0:4000/v1/audio/transcriptions' \
--header 'Authorization: Bearer sk-1234' \
--form 'file=@"/Users/krrishdholakia/Downloads/gettysburg.wav"' \
--form 'model="nova-2"'
🚅
LiteLLM Enterprise
為正式環境打造的 SSO/SAML、稽核記錄、支出追蹤、多團隊管理與防護欄。
深入瞭解 →