set model and don't delete file if requeing
This commit is contained in:
parent
ae1429ff63
commit
2a3615226e
1 changed files with 1 additions and 1 deletions
|
|
@ -80,7 +80,6 @@ _|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| {======|_|"""""|_|"""""
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
error!("Failed to transcribe {}, {}", &transcription_request.audio_file_path, error);
|
error!("Failed to transcribe {}, {}", &transcription_request.audio_file_path, error);
|
||||||
|
|
||||||
delete_file(path);
|
|
||||||
return delivery.reject(BasicRejectOptions {
|
return delivery.reject(BasicRejectOptions {
|
||||||
requeue: true
|
requeue: true
|
||||||
}).await.unwrap();
|
}).await.unwrap();
|
||||||
|
|
@ -130,6 +129,7 @@ async fn transcribe_call(file_path: &Path) -> Result<CreateTranscriptionResponse
|
||||||
.prompt("This is a public safety radio transmission. The speakers could be any of the following communicating between each other: dispatcher, law enforcement officer, fire fighter, or emergency medical services")
|
.prompt("This is a public safety radio transmission. The speakers could be any of the following communicating between each other: dispatcher, law enforcement officer, fire fighter, or emergency medical services")
|
||||||
.language("English")
|
.language("English")
|
||||||
.response_format(AudioResponseFormat::Text)
|
.response_format(AudioResponseFormat::Text)
|
||||||
|
.model("whisper-1")
|
||||||
.file(audio_input)
|
.file(audio_input)
|
||||||
.build()?;
|
.build()?;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue