Skip to content

Commit

Permalink
"Apply translation to TTS" and "Apply translation to Textbox" no long…
Browse files Browse the repository at this point in the history
…er apply to both systems if one is active
  • Loading branch information
PaciStardust committed Sep 23, 2022
1 parent 1692669 commit d3b8422
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 10 additions & 2 deletions OscMultitool/Hoscy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
<UseWPF>true</UseWPF>
<ApplicationIcon>Resources\hoscy_circle.ico</ApplicationIcon>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyVersion>0.2.2</AssemblyVersion>
<FileVersion>0.2.2</FileVersion>
<AssemblyVersion>0.2.3</AssemblyVersion>
<FileVersion>0.2.3</FileVersion>
<RepositoryUrl>https://github.com/PaciStardust/HOSCY</RepositoryUrl>
<PackageProjectUrl>https://github.com/PaciStardust/HOSCY</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand All @@ -23,6 +24,13 @@
<Content Include="Resources\hoscy_circle.ico" />
</ItemGroup>

<ItemGroup>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.23.0" />
<PackageReference Include="NAudio" Version="2.1.0" />
Expand Down
8 changes: 4 additions & 4 deletions OscMultitool/Services/Speech/TextProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ private async Task ProcessInternal(string message)

if (UseTextbox)
{
if (Config.Textbox.AddOriginalAfterTranslate)
Textbox.Say($"{translation} <> {message}");
if (Config.Textbox.TranslateTextbox)
Textbox.Say(translation + (Config.Textbox.AddOriginalAfterTranslate ? $" <> {message}" : string.Empty));
else
Textbox.Say(translation);
Textbox.Say(message);
}
if (UseTts)
Synthesizing.Say(translation);
Synthesizing.Say(Config.Speech.TranslateTts ? translation : message);

if (message != translation)
message = $"{translation}\n\n{message}";
Expand Down

0 comments on commit d3b8422

Please sign in to comment.