-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Replace TTS provider (#2278)"
This reverts commit 1728443.
- Loading branch information
Showing
19 changed files
with
4,857 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace Content.Server.Corvax.TTS; | ||
|
||
// ReSharper disable once InconsistentNaming | ||
public sealed partial class TTSSystem | ||
{ | ||
private string ToSsmlText(string text, SoundTraits traits = SoundTraits.None) | ||
{ | ||
var result = text; | ||
if (traits.HasFlag(SoundTraits.RateFast)) | ||
result = $"<prosody rate=\"fast\">{result}</prosody>"; | ||
if (traits.HasFlag(SoundTraits.PitchVerylow)) | ||
result = $"<prosody pitch=\"x-low\">{result}</prosody>"; | ||
return $"<speak>{result}</speak>"; | ||
} | ||
|
||
[Flags] | ||
private enum SoundTraits : ushort | ||
{ | ||
None = 0, | ||
RateFast = 1 << 0, | ||
PitchVerylow = 1 << 1, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Silero.AI for providing API of their TTS (Text-To-Speech) |
Oops, something went wrong.