From 807d6e577cb596bfe6d4d9c221a5728f1d1f0ad0 Mon Sep 17 00:00:00 2001 From: sloganking Date: Wed, 25 Oct 2023 14:41:05 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BBetter=20punctuation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Partially help #4 --- src/main.rs | 18 +++++++++--------- src/transcribe.rs | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1d08aa5..5d6447e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -406,15 +406,15 @@ fn main() -> Result<(), Box> { } }; - if let Some(last_char) = transcription.chars().last() { - if last_char != '.' - && last_char != '?' - && last_char != '!' - && last_char != ',' - { - transcription.push('.'); - } - } + // if let Some(last_char) = transcription.chars().last() { + // if last_char != '.' + // && last_char != '?' + // && last_char != '!' + // && last_char != ',' + // { + // transcription.push('.'); + // } + // } transcription.push(' '); enigo.key_sequence(&transcription); diff --git a/src/transcribe.rs b/src/transcribe.rs index 3a20211..1eeb79c 100644 --- a/src/transcribe.rs +++ b/src/transcribe.rs @@ -67,6 +67,7 @@ pub mod trans { let request = CreateTranscriptionRequestArgs::default() .file(input_mp3) .model("whisper-1") + .prompt("And now, a transcription from random language(s) that concludes with perfect punctuation: ") .build() .context("Failed to build transcription request.")?;