review comments

This commit is contained in:
Gokul Mohanarangan
2023-08-21 13:50:59 +05:30
parent 78153c6cfb
commit a0ea32db8a
2 changed files with 7 additions and 10 deletions

View File

@@ -29,10 +29,7 @@ class AudioTranscriptModalProcessor(AudioTranscriptProcessor):
self.transcript_url = settings.TRANSCRIPT_URL + "/transcribe"
self.warmup_url = settings.TRANSCRIPT_URL + "/warmup"
self.timeout = settings.TRANSCRIPT_TIMEOUT
self.headers = {
"Authorization": f"Bearer {modal_api_key}",
# "Content-Type": "multipart/form-data"
}
self.headers = {"Authorization": f"Bearer {modal_api_key}"}
async def _warmup(self):
try:
@@ -90,7 +87,7 @@ class AudioTranscriptModalProcessor(AudioTranscriptProcessor):
if target_language in result["text"]:
text = result["text"][target_language]
else:
text = result["text"]["en"]
text = result["text"][source_language]
transcript = Transcript(
text=text,
words=[