From 469ec0d68a4a05d0f2f03f25d0241082aefcc515 Mon Sep 17 00:00:00 2001 From: Lyrcaxis Date: Sun, 7 Apr 2024 19:16:19 +0300 Subject: [PATCH] minor fixup --- LLama.Examples/Examples/SpeechTranscription.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LLama.Examples/Examples/SpeechTranscription.cs b/LLama.Examples/Examples/SpeechTranscription.cs index 070bbe8e..9c32e608 100644 --- a/LLama.Examples/Examples/SpeechTranscription.cs +++ b/LLama.Examples/Examples/SpeechTranscription.cs @@ -26,7 +26,7 @@ namespace LLama.Examples.Examples { if (AudioTranscription.Contains("Artificial Intelligence", StringComparison.CurrentCultureIgnoreCase)) { Console.ForegroundColor = ConsoleColor.DarkRed; - Console.WriteLine($"Skipped text because it's not of interest {AudioTranscription}"); + Console.WriteLine($"Skipped text because it's not of interest: {AudioTranscription}"); Console.ForegroundColor = ConsoleColor.White; return false; } @@ -121,7 +121,7 @@ If there are pauses, form paragraphs that leaves related parts together, and spl } } - /// Requests a transcription and responds with the text. Whisper.net currently doesn't work well with parallelism. + /// Requests a transcription and responds with the text. async Task ProcessAudio(byte[] bytes, string tempWavFilePath) { var wavStream = new MemoryStream(); @@ -175,10 +175,10 @@ If there are pauses, form paragraphs that leaves related parts together, and spl return null; } } - public static async Task LoadPrint(string startText, Func ShouldContinue) + public static async Task LoadPrint(string initialText, Func ShouldContinue) { var startTime = DateTime.Now; - Console.Write(startText); + Console.Write(initialText); while (!ShouldContinue()) { Console.Write("."); await Task.Delay(100); } Console.WriteLine($" Completed in {(DateTime.Now - startTime).TotalSeconds:f2}s."); }