fixes
This commit is contained in:
parent
f8b2ae07b8
commit
2270014219
1 changed files with 3 additions and 3 deletions
|
|
@ -221,9 +221,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
|
||||||
|
|
@ -233,7 +233,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