Transcript Enrichment
Translation
Translate the transcript using output_language. Result replaces the text field and also appears in nlp_analysis.translation.
Python SDK
python
config = TranscriptionConfig(
model="zero-indic",
output_language="en",
)
result = await client.asr.transcribe("audio.wav", config=config)
print(result.text)
# Hello, this is an urgent call regarding your vehicle service.
print(result.detected_language)
# hindi
print(result.nlp_analysis.translation)
# Hello, this is an urgent call regarding your vehicle service.REST API
terminal
curl -X POST https://asr.shunyalabs.ai/v1/audio/transcriptions \
-H "Authorization: Bearer <API_KEY>" \
-F "[email protected]" \
-F "model=zero-indic" \
-F "output_language=en"Output
json
{
"text": "Hello, this is an urgent call regarding your vehicle service.",
"detected_language": "hindi",
"nlp_analysis": {
"translation": "Hello, this is an urgent call regarding your vehicle service."
}
}