-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathproperties.go
170 lines (159 loc) · 4.98 KB
/
properties.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
package azuretexttospeech
// AudioOutput types represent the supported audio encoding formats for the text-to-speech endpoint.
// This type is required when requesting to azuretexttospeech.Synthesize text-to-speed request.
// Each incorporates a bitrate and encoding type. The Speech service supports 24 kHz, 16 kHz, and 8 kHz audio outputs.
// See: https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-text-to-speech#audio-outputs
type AudioOutput int
const (
AudioRIFF8Bit8kHzMonoPCM AudioOutput = iota
AudioRIFF16Bit16kHzMonoPCM
AudioRIFF16khz16kbpsMonoSiren
AudioRIFF24khz16bitMonoPcm
AudioRAW8Bit8kHzMonoMulaw
AudioRAW16Bit16kHzMonoMulaw
AudioRAW24khz16bitMonoPcm
AudioSsml16khz16bitMonoTts
Audio16khz16kbpsMonoSiren
Audio16khz32kbitrateMonoMp3
Audio6khz64kbitrateMonoMp3
Audio16khz128kbitrateMonoMp3
Audio24khz48kbitrateMonoMp3
Audio24khz96kbitrateMonoMp3
)
func (a AudioOutput) String() string {
return []string{"riff-8khz-8bit-mono-mulaw",
"riff-16khz-16bit-mono-pcm",
"riff-16khz-16kbps-mono-siren",
"riff-24khz-16bit-mono-pcm",
"raw-8khz-8bit-mono-mulaw",
"raw-16khz-16bit-mono-pcm",
"raw-24khz-16bit-mono-pcm",
"ssml-16khz-16bit-mono-tts",
"audio-16khz-16kbps-mono-siren",
"audio-16khz-32kbitrate-mono-mp3",
"audio-16khz-64kbitrate-mono-mp3",
"audio-16khz-128kbitrate-mono-mp3",
"audio-24khz-48kbitrate-mono-mp3",
"audio-24khz-96kbitrate-mono-mp3",
}[a]
}
// Gender type for the digitized language
//go:generate enumer -type=Gender -linecomment -json
type Gender int
const (
// GenderMale , GenderFemale are the static Gender constants for digitized voices.
// See Gender in https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#standard-voices for breakdown
GenderMale Gender = iota // Male
GenderFemale // Female
)
// Locale references the language or locale for text-to-speech.
// See "locale" in https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#standard-voices
//go:generate enumer -type=Locale -linecomment -json
type Locale int
const (
LocaleArEG Locale = iota //ar-EG
LocaleArSA // ar-SA
LocaleBgBG // bg-BG
LocaleCaES // ca-ES
LocaleCsCZ // cs-CZ
LocaleDaDK // da-DK
LocaleDeAT // de-AT
LocaleDeCH // de-CH
LocaleDeDE // de-DE
LocaleElGR // el-GR
LocaleEnAU // en-AU
LocaleEnCA // en-CA
LocaleEnGB // en-GB
LocaleEnIE // en-IE
LocaleEnIN // en-IN
LocaleEnUS // en-US
LocaleEsES // es-ES
LocaleEsMX // es-MX
LocaleEtEE // et-EE
LocaleFiFI // fi-FI
LocaleFrCA // fr-CA
LocaleFrCH // fr-CH
LocaleFrFR // fr-FR
LocaleGaIE // ga-IE
LocaleHeIL // he-IL
LocaleHiIN // hi-IN
LocaleHrHR // hr-HR
LocaleHuHU // hu-HU
LocaleIdID // id-ID
LocaleItIT // it-IT
LocaleJaJP // ja-JP
LocaleKoKR // ko-KR
LocaleLtLT // lt-LT
LocaleLvLV // lv-LV
LocaleMtMT // mt-MT
LocaleMrIN // mr-IN
LocaleMsMY // ms-MY
LocaleNbNO // nb-NO
LocaleNlNL // nl-NL
LocalePlPL // pl-PL
LocalePtBR // pt-BR
LocalePtPT // pt-PT
LocaleRoRO // ro-RO
LocaleRuRU // ru-RU
LocaleSkSK // sk-SK
LocaleSlSI // sl-SI
LocaleSvSE // sv-SE
LocaleTaIN // ta-IN
LocaleTeIN // te-IN
LocaleThTH // th-TH
LocaleTrTR // tr-TR
LocaleViVN // vi-VN
LocaleZhCN // zh-CN
LocaleZhHK // zh-HK
LocaleZhTW // zh-TW
)
// Region references the locations of the availability of standard voices.
// See https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/regions#standard-voices
type Region int
const (
// Azure regions and their endpoints that support the Text To Speech service.
RegionAustraliaEast Region = iota
RegionBrazilSouth
RegionCanadaCentral
RegionCentralUS
RegionEastAsia
RegionEastUS
RegionEastUS2
RegionFranceCentral
RegionIndiaCentral
RegionJapanEast
RegionJapanWest
RegionKoreaCentral
RegionNorthCentralUS
RegionNorthEurope
RegionSouthCentralUS
RegionSoutheastAsia
RegionUKSouth
RegionWestEurope
RegionWestUS
RegionWestUS2
)
func (t Region) String() string {
return [...]string{
"australiaeast",
"brazilsouth",
"canadacentral",
"centralus",
"eastasia",
"eastus",
"eastus2",
"francecentral",
"indiacentral",
"japaneast",
"japanwest",
"koreacentral",
"northcentralus",
"northeurope",
"southcentralus",
"southeastasia",
"uksouth",
"westeurope",
"westus",
"westus2",
}[t]
}