From 5e53f89b13efd821f79835b7b25569dd414e11d6 Mon Sep 17 00:00:00 2001 From: am009 Date: Tue, 4 Jul 2023 13:35:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dbug=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=AF=86=E5=88=AB=E5=BA=93=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 支持识别结果的滚动 --- README.md | 7 +++---- TMSpeech.GUI/CmdSpeech.cs | 2 +- TMSpeech.GUI/MainWindow.xaml | 8 +++++--- TMSpeech.GUI/MainWindow.xaml.cs | 5 ++++- TMSpeech.GUI/SpeechCore.cs | 2 +- TMSpeech.GUI/TMSpeech.GUI.csproj | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5763b26..31ce4dc 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,13 @@ 在[Release](https://github.com/jxlpzqc/TMSpeech/releases)页面中下载最新的release解压,运行`TMSpeech.GUI.exe`即可。在桌面创建快捷方式,使用起来更加方便。 -## 我们需要你的贡献 +## 我们需要你的反馈 觉得很有用?但是还有不完美的地方?欢迎点击这里[创建Discussion](https://github.com/jxlpzqc/TMSpeech/discussions/new)、提出反馈! - 识别准确率不高? - - 这可能需要更好的模型。如果你发现了效果更好的开源模型,欢迎推荐给我们! - - 想要用自己的模型? + - 这可能需要更好的模型。当前我们支持sherpa-onnx的流式模型,可以在设置中修改模型路径。 + - [想要用自己的模型?](https://github.com/jxlpzqc/TMSpeech/issues/6) 如果你发现了效果更好的开源模型,也欢迎推荐给我们! - 还需要更多功能? - 请点击这里[创建issue](https://github.com/jxlpzqc/TMSpeech/issues/new)告诉我们! - 如果你懂Windows/C#开发,欢迎提交pull request,开发的过程中遇到任何问题可以创建issue和我们讨论。 - diff --git a/TMSpeech.GUI/CmdSpeech.cs b/TMSpeech.GUI/CmdSpeech.cs index d8230da..1ea6027 100644 --- a/TMSpeech.GUI/CmdSpeech.cs +++ b/TMSpeech.GUI/CmdSpeech.cs @@ -107,7 +107,7 @@ public void Run() }); } } - catch (EndOfStreamException e) { } + catch (EndOfStreamException) { } } diff --git a/TMSpeech.GUI/MainWindow.xaml b/TMSpeech.GUI/MainWindow.xaml index 0aef179..7986daf 100644 --- a/TMSpeech.GUI/MainWindow.xaml +++ b/TMSpeech.GUI/MainWindow.xaml @@ -32,9 +32,11 @@ - - Wait for audio input... - + + + Wait for audio input... + + diff --git a/TMSpeech.GUI/MainWindow.xaml.cs b/TMSpeech.GUI/MainWindow.xaml.cs index e63828c..05b12fd 100644 --- a/TMSpeech.GUI/MainWindow.xaml.cs +++ b/TMSpeech.GUI/MainWindow.xaml.cs @@ -167,7 +167,10 @@ private void btnShowHistory_Click(object sender, RoutedEventArgs e) if (_historyShown) { listHistory.Visibility = Visibility.Collapsed; - this.Height -= 100; + if (this.Height - 100 > 30) + { + this.Height -= 100; + } } else { diff --git a/TMSpeech.GUI/SpeechCore.cs b/TMSpeech.GUI/SpeechCore.cs index dc3db10..f06ffae 100644 --- a/TMSpeech.GUI/SpeechCore.cs +++ b/TMSpeech.GUI/SpeechCore.cs @@ -104,7 +104,7 @@ public void Run(string encoder, string decoder, string joiner, string tokens, st }); CurrentText = text; - if (is_endpoint) + if (is_endpoint || text.Length >= 80) { AllTexts.Add(item); if (!string.IsNullOrEmpty(savefile)) diff --git a/TMSpeech.GUI/TMSpeech.GUI.csproj b/TMSpeech.GUI/TMSpeech.GUI.csproj index abc6f62..5d45981 100644 --- a/TMSpeech.GUI/TMSpeech.GUI.csproj +++ b/TMSpeech.GUI/TMSpeech.GUI.csproj @@ -10,7 +10,7 @@ - 1.4.3 + 1.4.8