fixes
This commit is contained in:
parent
50f1b94856
commit
d65fd8a649
1 changed files with 3 additions and 3 deletions
|
|
@ -215,9 +215,9 @@ class OpenaiApiASR(ASRBase):
|
||||||
"temperature": self.temperature
|
"temperature": self.temperature
|
||||||
}
|
}
|
||||||
if self.task != "translate" and self.language:
|
if self.task != "translate" and self.language:
|
||||||
transcription_params["language"] = self.language
|
params["language"] = self.language
|
||||||
if prompt:
|
if prompt:
|
||||||
transcription_params["prompt"] = prompt
|
params["prompt"] = prompt
|
||||||
|
|
||||||
if self.task == "translate":
|
if self.task == "translate":
|
||||||
proc = self.client.audio.translations
|
proc = self.client.audio.translations
|
||||||
|
|
@ -227,7 +227,7 @@ class OpenaiApiASR(ASRBase):
|
||||||
# Process transcription/translation
|
# Process transcription/translation
|
||||||
|
|
||||||
transcript = proc.create(**params)
|
transcript = proc.create(**params)
|
||||||
print(f"OpenAI API processed accumulated {self.transcribed_seconds} seconds ",file=self.logfile)
|
print(f"OpenAI API processed accumulated {self.transcribed_seconds} seconds",file=self.logfile)
|
||||||
|
|
||||||
return transcript.segments
|
return transcript.segments
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue