Skip to content

Commit

Permalink
fix: 修复bug,更新识别库版本
Browse files Browse the repository at this point in the history
支持识别结果的滚动
  • Loading branch information
am009 committed Jul 4, 2023
1 parent 46c9127 commit 5e53f89
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@

[Release](https://github.com/jxlpzqc/TMSpeech/releases)页面中下载最新的release解压,运行`TMSpeech.GUI.exe`即可。在桌面创建快捷方式,使用起来更加方便。

## 我们需要你的贡献
## 我们需要你的反馈

This comment has been minimized.

Copy link
@csukuangfj

csukuangfj Jul 4, 2023

可以试试最新版的 int8 zipformer 模型。
发版时的 .zip 文件,应该可以控制在 100MB 以内.

https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-transducer/zipformer-transducer-models.html#pkufool-icefall-asr-zipformer-streaming-wenetspeech-20230615-chinese

(文档中的 int8 decoder 模型文件大小没更新,是几应该是4MB)

This comment has been minimized.

Copy link
@am009

am009 Jul 4, 2023

Author Collaborator

增加了一个最新的 zipformer int8 模型的release


觉得很有用?但是还有不完美的地方?欢迎点击这里[创建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和我们讨论。

2 changes: 1 addition & 1 deletion TMSpeech.GUI/CmdSpeech.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void Run()
});
}
}
catch (EndOfStreamException e) { }
catch (EndOfStreamException) { }


}
Expand Down
8 changes: 5 additions & 3 deletions TMSpeech.GUI/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
<Grid IsHitTestVisible="True">
<DockPanel>

<local:OutlinedTextBlock DockPanel.Dock="Bottom" x:Name="txtMain" IsHitTestVisible="True" FontWeight="ExtraBold" TextWrapping="Wrap" StrokeThickness="{DynamicResource StrokeSize}" Stroke="{DynamicResource StrokeBrush}" FontSize="{DynamicResource FontSize}" Fill="{DynamicResource FontBrush}" FontFamily="{DynamicResource FontFamily}">
Wait for audio input...
</local:OutlinedTextBlock>
<ScrollViewer DockPanel.Dock="Bottom" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<local:OutlinedTextBlock DockPanel.Dock="Bottom" x:Name="txtMain" IsHitTestVisible="True" FontWeight="ExtraBold" TextWrapping="Wrap" StrokeThickness="{DynamicResource StrokeSize}" Stroke="{DynamicResource StrokeBrush}" FontSize="{DynamicResource FontSize}" Fill="{DynamicResource FontBrush}" FontFamily="{DynamicResource FontFamily}">
Wait for audio input...
</local:OutlinedTextBlock>
</ScrollViewer>

<ListBox Name="listHistory" Visibility="Collapsed" Background="{DynamicResource ListBgBrush}" HorizontalContentAlignment="Stretch"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
Expand Down
5 changes: 4 additions & 1 deletion TMSpeech.GUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion TMSpeech.GUI/SpeechCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion TMSpeech.GUI/TMSpeech.GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="NAudio.Wasapi" Version="2.1.0" />
<PackageReference Include="org.k2fsa.sherpa.onnx">
<Version>1.4.3</Version>
<Version>1.4.8</Version>
</PackageReference>
<PackageReference Include="PropertyTools.Wpf" Version="3.1.0" />
</ItemGroup>
Expand Down

0 comments on commit 5e53f89

Please sign in to comment.