set model and don't delete file if requeing

This commit is contained in:
Christopher Moyer 2024-12-18 20:37:12 -05:00
parent ae1429ff63
commit 2a3615226e

View file

@ -80,7 +80,6 @@ _|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| {======|_|"""""|_|"""""
Err(error) => {
error!("Failed to transcribe {}, {}", &transcription_request.audio_file_path, error);
delete_file(path);
return delivery.reject(BasicRejectOptions {
requeue: true
}).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")
.language("English")
.response_format(AudioResponseFormat::Text)
.model("whisper-1")
.file(audio_input)
.build()?;