IBM WatsonX 오디오 전사
IBM WatsonX 오디오 전사 (Audio Transcription)
WatsonX의 오디오 전사 기능을 LiteLLM에서 사용하는 방법을 알아봐요. Whisper 모델 기반의 speech-to-text를 watsonx/ 라우트를 통해 호출할 수 있어요.
출처: 문서
본문
개요
| 속성 | 내용 |
|---|---|
| 설명 | WatsonX의 오디오 전사(Whisper 모델 기반 speech-to-text) |
| LiteLLM 라우트 | watsonx/ |
| 지원 연산 | /v1/audio/transcriptions |
| 공식 문서 | IBM WatsonX.ai ↗ |
빠른 시작
LiteLLM SDK
litellm.transcription을 호출하면 돼요.
import litellm
response = litellm.transcription(
model="watsonx/whisper-large-v3-turbo",
file=open("audio.mp3", "rb"),
api_base="https://us-south.ml.cloud.ibm.com",
api_key="your-api-key",
project_id="your-project-id"
)
print(response.text)
LiteLLM Proxy
config.yaml에 모델을 등록하고, openai 호환 /v1/audio/transcriptions 엔드포인트로 요청하면 돼요.
model_list:
- model_name: whisper-large-v3-turbo
litellm_params:
model: watsonx/whisper-large-v3-turbo
api_key: os.environ/WATSONX_APIKEY
api_base: os.environ/WATSONX_URL
project_id: os.environ/WATSONX_PROJECT_ID
요청 예시:
curl http://localhost:4000/v1/audio/transcriptions \
-H "Authorization: Bearer ***" \
-F file="@audio.mp3" \
-F model="whisper-large-v3-turbo"
지원 파라미터
| 파라미터 | 타입 | 설명 |
|---|---|---|
model |
string | 모델 ID (예: watsonx/whisper-large-v3-turbo) |
file |
file | 전사할 오디오 파일 |
language |
string | 언어 코드 (예: en) |
prompt |
string | 전사를 안내하는 선택적 프롬프트 |
temperature |
float | 샘플링 온도 (0-1) |
response_format |
string | json, text, srt, verbose_json, vtt |
더 알아보기 (Learn more)
- IBM WatsonX.ai 공식 문서
- LiteLLM 오디오 전사 API