Skip to content

Commit

Permalink
perf: update version to 1.2.8.1112
Browse files Browse the repository at this point in the history
  • Loading branch information
ZGGSONG committed Nov 12, 2024
1 parent d4ad61b commit 510ece8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 35 deletions.
24 changes: 3 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
## 更新

- 添加: 添加粘贴文本自动翻译
- 添加: 添加内置金山词霸、必应词典
- 添加: 添加启动时不显示通知的开关 @Greyh4t
- 添加: 添加内置EdgeTTS
- 添加: 添加软件内语音播报结果(设置-热键设置-软件热键列表查看)
- 添加: 添加生词本-欧陆词典(需配置主界面显示)
- 添加: 快捷添加到生词本软件热键(Ctrl+Shift+S)
- 添加: OpenAI OCR添加模型 `gpt-4o-mini-2024-07-18`
- 优化: 输出界面使用新的加载动画
- 优化: 使用鼠标样式标记替换翻译&静默OCR进度
- 优化: 更新鼠标划词描述
- 优化: 移除截图翻译OCR后复制结果
- 优化: 优化词典显示效果
- 优化: 合并设置界面服务列表
- 优化: 优化替换翻译选择语种逻辑
- 修复: 文本框默认样式启动时为黑暗模式的问题
- 修复: 更新托盘程序库版本至 `2.0.1` 修复显示空白框问题
- 修复: 启用翻译后自动复制无法取词的问题
- 修复: 修复150%缩放下主界面超出屏幕上边缘的问题
- 修复: 修复STranslate服务无法翻译的问题
- 添加: 移除换行、空格支持处理选中文本,不选中则处理全部文本
- 修复: EdgeTTS失效的问题

**完整更新日志:** [1.2.6.1001...1.2.7.1110](https://github.com/ZGGSONG/STranslate/compare/1.2.5.927...1.2.6.1001)
**完整更新日志:** [1.2.7.1110...1.2.8.1112](https://github.com/ZGGSONG/STranslate/compare/1.2.7.1110...1.2.8.1112)

## 离线数据

Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageVersion Include="Dapper" Version="2.1.35" />
<PackageVersion Include="Dapper.Contrib" Version="2.0.78" />
<PackageVersion Include="Edge_tts_sharp" Version="1.1.2" />
<PackageVersion Include="EdgeTTS.Net" Version="1.1.2.2" />
<PackageVersion Include="gong-wpf-dragdrop" Version="3.2.1" />
<PackageVersion Include="H.InputSimulator" Version="1.4.2" />
<PackageVersion Include="Hardcodet.NotifyIcon.Wpf" Version="2.0.1" />
Expand Down
6 changes: 3 additions & 3 deletions src/STranslate/STranslate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ApplicationManifest>app.manifest</ApplicationManifest>
<PlatformTarget>x64</PlatformTarget>
<AssemblyVersion>1.2.7.1110</AssemblyVersion>
<FileVersion>1.2.7.1110</FileVersion>
<AssemblyVersion>1.2.8.1112</AssemblyVersion>
<FileVersion>1.2.8.1112</FileVersion>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Copyright>ZGGSONG</Copyright>
<BaseOutputPath>..\..\bin\</BaseOutputPath>
Expand Down Expand Up @@ -67,7 +67,7 @@
<PackageReference Include="CommunityToolkit.Mvvm" />
<PackageReference Include="Dapper" />
<PackageReference Include="Dapper.Contrib" />
<PackageReference Include="Edge_tts_sharp" />
<PackageReference Include="EdgeTTS.Net" />
<PackageReference Include="gong-wpf-dragdrop" />
<PackageReference Include="H.InputSimulator" />
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" />
Expand Down
14 changes: 4 additions & 10 deletions src/STranslate/ViewModels/Preference/TTS/TTSEdge.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Edge_tts_sharp;
using Edge_tts_sharp.Model;
using EdgeTTS.Net;
using EdgeTTS.Net.Models;
using Newtonsoft.Json;
using STranslate.Log;
using STranslate.Model;
Expand Down Expand Up @@ -77,19 +77,13 @@ public async Task SpeakTextAsync(string text, CancellationToken token)
try
{
var voiceName = $"Microsoft Server Speech Text to Speech Voice ({Voice.ToString().Replace("_", "-").Replace("8", ", ")})";
var voice = Edge_tts.GetVoice().FirstOrDefault(x => x.Name == voiceName);
var voice = EdgeTts.GetVoice().FirstOrDefault(x => x.Name == voiceName) ?? EdgeTts.GetVoice().First();
var option = new PlayOption
{
Rate = 0,
Text = text
};
var player = Edge_tts.GetPlayer(option, voice);

// 支持取消操作
await using (token.Register(() => player.Stop()))
{
await player.PlayAsync();
}
await EdgeTts.PlayTextAsync(option, voice, token);
}
catch (OperationCanceledException)
{
Expand Down

0 comments on commit 510ece8

Please sign in to comment.