From 3ff4d5de7d7d0d5434bac5afdeff2cbe403a8593 Mon Sep 17 00:00:00 2001 From: Gennady Kurbesov Date: Sun, 24 Mar 2024 16:38:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D1=80=D1=8B=20=D0=B3=D0=BE=D0=BB=D0=BE=D1=81=D0=BE?= =?UTF-8?q?=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YaCloudKit.TTS/Model/VoiceEmotion.cs | 6 +-- .../YaCloudKit.TTS/Model/VoiceLanguage.cs | 8 ++-- .../YaCloudKit.TTS/Model/VoiceName.cs | 22 ++++++----- .../YaCloudKit.TTS/Model/VoiceParameters.cs | 38 ++++++++++++++++++- 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceEmotion.cs b/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceEmotion.cs index cf28bbd..d36bdc4 100644 --- a/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceEmotion.cs +++ b/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceEmotion.cs @@ -4,9 +4,9 @@ namespace YaCloudKit.TTS; public class VoiceEmotion { - public static readonly VoiceEmotion Neutral = new VoiceEmotion("neutral"); - public static readonly VoiceEmotion Good = new VoiceEmotion("good"); - public static readonly VoiceEmotion Evil = new VoiceEmotion("evil"); + public static readonly VoiceEmotion Neutral = new("neutral"); + public static readonly VoiceEmotion Good = new("good"); + public static readonly VoiceEmotion Evil = new("evil"); public string Value { get; } diff --git a/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceLanguage.cs b/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceLanguage.cs index f466fb2..c647a7e 100644 --- a/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceLanguage.cs +++ b/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceLanguage.cs @@ -4,9 +4,11 @@ namespace YaCloudKit.TTS; public class VoiceLanguage { - public static readonly VoiceLanguage Russian = new VoiceLanguage("ru-RU"); - public static readonly VoiceLanguage Kazakh = new VoiceLanguage("kk-KK"); - public static readonly VoiceLanguage English = new VoiceLanguage("en-US"); + public static readonly VoiceLanguage Russian = new("ru-RU"); + public static readonly VoiceLanguage Kazakh = new("kk-KK"); + public static readonly VoiceLanguage English = new("en-US"); + public static readonly VoiceLanguage German = new("de-DE"); + public static readonly VoiceLanguage Uzbek = new("uz-UZ"); public string Value { get; } diff --git a/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceName.cs b/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceName.cs index ece58a4..b64cb4c 100644 --- a/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceName.cs +++ b/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceName.cs @@ -4,15 +4,19 @@ namespace YaCloudKit.TTS; public class VoiceName { - public static readonly VoiceName Alena = new VoiceName("alena"); - public static readonly VoiceName Filipp = new VoiceName("filipp"); - public static readonly VoiceName Jane = new VoiceName("jane"); - public static readonly VoiceName Omazh = new VoiceName("omazh"); - public static readonly VoiceName Zahar = new VoiceName("zahar"); - public static readonly VoiceName Ermil = new VoiceName("ermil"); - public static readonly VoiceName Amira = new VoiceName("amira"); - public static readonly VoiceName John = new VoiceName("john"); - + public static readonly VoiceName Lea = new("lea"); + public static readonly VoiceName Alena = new("alena"); + public static readonly VoiceName Filipp = new("filipp"); + public static readonly VoiceName Jane = new("jane"); + public static readonly VoiceName Omazh = new("omazh"); + public static readonly VoiceName Zahar = new("zahar"); + public static readonly VoiceName Ermil = new("ermil"); + public static readonly VoiceName Amira = new("amira"); + public static readonly VoiceName John = new("john"); + public static readonly VoiceName Madi = new("madi"); + public static readonly VoiceName Madirus = new("madirus"); + public static readonly VoiceName Nigora = new("nigora"); + public string Value { get; } public VoiceName(string value) diff --git a/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceParameters.cs b/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceParameters.cs index 687ce55..f0b2703 100644 --- a/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceParameters.cs +++ b/src/TextToSpeech/YaCloudKit.TTS/Model/VoiceParameters.cs @@ -7,6 +7,11 @@ namespace YaCloudKit.TTS /// public class VoiceParameters { + /// + /// Женский немецкий голос Lea + /// + public static readonly VoiceParameters Lea = new(VoiceName.Lea); + /// /// Женский русский голос Alena /// @@ -37,6 +42,30 @@ public class VoiceParameters /// public static readonly VoiceParameters Ermil = new(VoiceName.Ermil); + /// + /// Женский казахский голос + /// + public static readonly VoiceParameters Amira = new(VoiceName.Amira); + + /// + /// Мужской казахский голос + /// + public static readonly VoiceParameters Madi = new(VoiceName.Madi); + + /// + /// Мужской английский голос + /// + public static readonly VoiceParameters John = new(VoiceName.John); + + /// + /// Мужской русский голос + /// + public static readonly VoiceParameters Madirus = new(VoiceName.Madirus); + + /// + /// Женский узбекский голос + /// + public static readonly VoiceParameters Nigora = new(VoiceName.Nigora); /// /// Название голоса. Подробнее см. список голосов @@ -64,11 +93,18 @@ public class VoiceParameters /// Инициалзация параметров голоса для генерации речи /// /// Название голоса - public VoiceParameters(VoiceName name) + public VoiceParameters( + VoiceName name, + VoiceLanguage language = null, + string speed = null, + VoiceEmotion emotion = null) { if (string.IsNullOrWhiteSpace(name)) throw new ArgumentNullException(nameof(name)); Name = name; + Language = language; + Speed = speed; + Emotion = emotion; } } } \ No newline at end of file