|
@@ -0,0 +1,123 @@
|
|
|
+package yask
|
|
|
+
|
|
|
+
|
|
|
+type Voice struct {
|
|
|
+ NameEn string `json:"name_en"`
|
|
|
+ MameRu string `json:"name_ru"`
|
|
|
+ Voice string `json:"voice"`
|
|
|
+ Lang string `json:"lang"`
|
|
|
+ Male bool `json:"is_male"`
|
|
|
+ Premium bool `json:"is_premium"`
|
|
|
+}
|
|
|
+
|
|
|
+const (
|
|
|
+
|
|
|
+ YaSTTUrl = "https://stt.api.cloud.yandex.net/speech/v1/stt:recognize"
|
|
|
+
|
|
|
+
|
|
|
+ YaTTSUrl = "https://tts.api.cloud.yandex.net/speech/v1/tts:synthesize"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ FormatLPCM = "lpcm"
|
|
|
+
|
|
|
+ FormatOgg = "oggopus"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ Rate8k int = 8000
|
|
|
+
|
|
|
+ Rate16k int = 16000
|
|
|
+
|
|
|
+ Rate48k int = 48000
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ LangRU = "ru-Ru"
|
|
|
+
|
|
|
+ LangEN = "en-US"
|
|
|
+
|
|
|
+ LangTR = "tr-TR"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ SpeedStandard float32 = 1.0
|
|
|
+
|
|
|
+ SpeedMostFastest float32 = 3.0
|
|
|
+
|
|
|
+ SpeedSlowest float32 = 0.1
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ VoiceOksana = "oksana"
|
|
|
+
|
|
|
+ VoiceJane = "jane"
|
|
|
+
|
|
|
+ VoiceOmazh = "omazh"
|
|
|
+
|
|
|
+ VoiceZahar = "zahar"
|
|
|
+
|
|
|
+ VoiceErmil = "ermil"
|
|
|
+
|
|
|
+ VoiceSilaerkan = "silaerkan"
|
|
|
+
|
|
|
+ VoiceErkanyavas = "erkanyavas"
|
|
|
+
|
|
|
+ VoiceAlyss = "alyss"
|
|
|
+
|
|
|
+ VoiceNick = "nick"
|
|
|
+
|
|
|
+ VoiceAlena = "alena"
|
|
|
+
|
|
|
+ VoiceFilipp = "filipp"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ EmotionGood = "good"
|
|
|
+
|
|
|
+ EmotionEvil = "evil"
|
|
|
+
|
|
|
+ EmotionNeutral = "neutral"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ TopicGeneral = "general"
|
|
|
+
|
|
|
+ TopicGeneralRC = "general:rc"
|
|
|
+
|
|
|
+ TopicGeneralDeprecated = "general:deprecated"
|
|
|
+
|
|
|
+ TopicMaps = "maps"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ SexAll = 0
|
|
|
+
|
|
|
+ SexMale = 1
|
|
|
+
|
|
|
+ SexFemale = 2
|
|
|
+)
|
|
|
+
|
|
|
+var (
|
|
|
+
|
|
|
+ voices = []Voice{
|
|
|
+ Voice{"Oksana", "Оксана", VoiceOksana, LangRU, false, false},
|
|
|
+ Voice{"Jane", "Джейн", VoiceJane, LangRU, false, false},
|
|
|
+ Voice{"Omazh", "Омаж", VoiceOmazh, LangRU, false, false},
|
|
|
+ Voice{"Zahar", "Захар", VoiceZahar, LangRU, true, false},
|
|
|
+ Voice{"Ermil", "Эрмил", VoiceErmil, LangTR, true, false},
|
|
|
+ Voice{"Sila Erkan", "Сыла Эркан", VoiceSilaerkan, LangTR, false, false},
|
|
|
+ Voice{"Alyss", "Элис", VoiceAlyss, LangTR, false, false},
|
|
|
+ Voice{"Nick", "Ник", VoiceNick, LangTR, true, false},
|
|
|
+ Voice{"Alena", "Алёна", VoiceNick, LangRU, false, true},
|
|
|
+ Voice{"Filipp", "Филипп", VoiceNick, LangRU, true, true},
|
|
|
+ }
|
|
|
+)
|