Skip to content

Commit b2067af

Browse files
gdhananiaclaude
authored andcommitted
Add language detection test for Hindi audio transcription
- Added test_language_detection_hindi() to verify language detection functionality - Uses Hindi audio file OSR_in_000_0062_16k.wav from voiptroubleshooter.com - Validates that whisper-large-v3 correctly identifies Hindi language as "hi" - Test uses verbose_json format to access language metadata 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 92ff12e commit b2067af

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/integration/resources/test_transcriptions.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,21 @@ def test_transcription_missing_model(self, sync_together_client):
108108
assert isinstance(response, AudioTranscriptionResponse)
109109
assert isinstance(response.text, str)
110110
assert len(response.text) > 0
111+
112+
def test_language_detection_hindi(self, sync_together_client):
113+
"""
114+
Test language detection with Hindi audio file
115+
"""
116+
audio_url = (
117+
"https://voiptroubleshooter.com/open_speech/hindi/OSR_in_000_0062_16k.wav"
118+
)
119+
120+
response = sync_together_client.audio.transcriptions.create(
121+
file=audio_url, model="openai/whisper-large-v3", response_format="verbose_json"
122+
)
123+
124+
assert isinstance(response, AudioTranscriptionVerboseResponse)
125+
assert isinstance(response.text, str)
126+
assert len(response.text) > 0
127+
assert hasattr(response, "language")
128+
assert response.language == "hi"

0 commit comments

Comments
 (0)