Skip to content

Commit

Permalink
EdgeTTS 又能开口说话了
Browse files Browse the repository at this point in the history
  • Loading branch information
STBBRD committed Nov 10, 2024
1 parent 89b9de2 commit 48d9366
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion ZongziTEK_Blackboard_Sticker/Helpers/TTSHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.IO;
using Edge_tts_sharp;
using System.Net.NetworkInformation;
using Edge_tts_sharp.Model;

namespace ZongziTEK_Blackboard_Sticker.Helpers
{
Expand All @@ -29,7 +30,14 @@ private static void EdgeTTSPlayText(string text)
Task.Run(() =>
{
var voice = Edge_tts.GetVoice()[55];
Edge_tts.PlayText(text, voice);

PlayOption option = new()
{
Rate = 1,
Text = text
};

Edge_tts.PlayText(option, voice);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
<Version>1.9.1</Version>
</PackageReference>
<PackageReference Include="EdgeTTS_dotNET_Framework">
<Version>1.1.1</Version>
<Version>1.1.2</Version>
</PackageReference>
<PackageReference Include="iNKORE.UI.WPF">
<Version>1.2.7.1</Version>
Expand Down

0 comments on commit 48d9366

Please sign in to comment.