Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi committed Dec 31, 2023
1 parent 296b95e commit 83d4ec8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daras_ai_v2/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,9 @@ def azure_asr(audio_url: str, language: str):
headers={"Ocp-Apim-Subscription-Key": settings.AZURE_SPEECH_KEY},
)
r.raise_for_status()
combined_phrases: list[dict] = dict(r.json()).get("combinedRecognizedPhrases", [{}]) or [{}]
combined_phrases: list[dict] = dict(r.json()).get(
"combinedRecognizedPhrases", [{}]
) or [{}]
transcriptions += [combined_phrases[0].get("display", "")]
return "\n".join(transcriptions)
assert False, "Max polls exceeded, Azure speech did not yield a response"
Expand Down

0 comments on commit 83d4ec8

Please sign in to comment.