jhudsl / mscstts

R Client for the Microsoft Cognitive Services Text to Speech REST API
GNU General Public License v3.0
8 stars 6 forks source link

Get token error when key is not for default region #7

Closed boltomli closed 4 years ago

boltomli commented 4 years ago

Currently key is region specific. When region is not default (westus)

ms_list_voices(api_key = 'my_key', region = 'southeastasia')

Triggers Error in ms_get_tts_token(api_key = api_key) : Unauthorized (HTTP 401).

boltomli commented 4 years ago

PR #8 fixes this, example output:

                                                                     Name             ShortName Gender Locale SampleRateHertz VoiceType
1              Microsoft Server Speech Text to Speech Voice (ar-EG, Hoda)            ar-EG-Hoda Female  ar-EG           16000  Standard
2             Microsoft Server Speech Text to Speech Voice (ar-SA, Naayf)           ar-SA-Naayf   Male  ar-SA           16000  Standard
3              Microsoft Server Speech Text to Speech Voice (bg-BG, Ivan)            bg-BG-Ivan   Male  bg-BG           16000  Standard
4         Microsoft Server Speech Text to Speech Voice (ca-ES, HerenaRUS)       ca-ES-HerenaRUS Female  ca-ES           16000  Standard
5             Microsoft Server Speech Text to Speech Voice (cs-CZ, Jakub)           cs-CZ-Jakub   Male  cs-CZ           16000  Standard
6          Microsoft Server Speech Text to Speech Voice (da-DK, HelleRUS)        da-DK-HelleRUS Female  da-DK           16000  Standard
7           Microsoft Server Speech Text to Speech Voice (de-AT, Michael)         de-AT-Michael   Male  de-AT           16000  Standard
8           Microsoft Server Speech Text to Speech Voice (de-CH, Karsten)         de-CH-Karsten   Male  de-CH           16000  Standard
9             Microsoft Server Speech Text to Speech Voice (de-DE, Hedda)           de-DE-Hedda Female  de-DE           16000  Standard
10         Microsoft Server Speech Text to Speech Voice (de-DE, HeddaRUS)        de-DE-HeddaRUS Female  de-DE           16000  Standard
11   Microsoft Server Speech Text to Speech Voice (de-DE, Stefan, Apollo)   de-DE-Stefan-Apollo   Male  de-DE           16000  Standard
12         Microsoft Server Speech Text to Speech Voice (el-GR, Stefanos)        el-GR-Stefanos   Male  el-GR           16000  Standard
13        Microsoft Server Speech Text to Speech Voice (en-AU, Catherine)       en-AU-Catherine Female  en-AU           16000  Standard
14        Microsoft Server Speech Text to Speech Voice (en-AU, HayleyRUS)       en-AU-HayleyRUS Female  en-AU           16000  Standard
15            Microsoft Server Speech Text to Speech Voice (en-CA, Linda)           en-CA-Linda Female  en-CA           16000  Standard
16       Microsoft Server Speech Text to Speech Voice (en-CA, HeatherRUS)      en-CA-HeatherRUS Female  en-CA           16000  Standard
17   Microsoft Server Speech Text to Speech Voice (en-GB, George, Apollo)   en-GB-George-Apollo   Male  en-GB           16000  Standard
18         Microsoft Server Speech Text to Speech Voice (en-GB, HazelRUS)        en-GB-HazelRUS Female  en-GB           16000  Standard
19    Microsoft Server Speech Text to Speech Voice (en-GB, Susan, Apollo)    en-GB-Susan-Apollo Female  en-GB           16000  Standard
20             Microsoft Server Speech Text to Speech Voice (en-IE, Sean)            en-IE-Sean   Male  en-IE           16000  Standard
21    Microsoft Server Speech Text to Speech Voice (en-IN, Heera, Apollo)    en-IN-Heera-Apollo Female  en-IN           16000  Standard
22         Microsoft Server Speech Text to Speech Voice (en-IN, PriyaRUS)        en-IN-PriyaRUS Female  en-IN           16000  Standard
23     Microsoft Server Speech Text to Speech Voice (en-IN, Ravi, Apollo)     en-IN-Ravi-Apollo   Male  en-IN           16000  Standard
24      Microsoft Server Speech Text to Speech Voice (en-US, BenjaminRUS)     en-US-BenjaminRUS   Male  en-US           16000  Standard
25        Microsoft Server Speech Text to Speech Voice (en-US, Guy24kRUS)       en-US-Guy24kRUS   Male  en-US           24000  Standard
26         Microsoft Server Speech Text to Speech Voice (en-US, JessaRUS)        en-US-JessaRUS Female  en-US           16000  Standard
27      Microsoft Server Speech Text to Speech Voice (en-US, Jessa24kRUS)     en-US-Jessa24kRUS Female  en-US           24000  Standard
28          Microsoft Server Speech Text to Speech Voice (en-US, ZiraRUS)         en-US-ZiraRUS Female  en-US           16000  Standard
29        Microsoft Server Speech Text to Speech Voice (es-ES, HelenaRUS)       es-ES-HelenaRUS Female  es-ES           16000  Standard
30    Microsoft Server Speech Text to Speech Voice (es-ES, Laura, Apollo)    es-ES-Laura-Apollo Female  es-ES           16000  Standard
31    Microsoft Server Speech Text to Speech Voice (es-ES, Pablo, Apollo)    es-ES-Pablo-Apollo   Male  es-ES           16000  Standard
32         Microsoft Server Speech Text to Speech Voice (es-MX, HildaRUS)        es-MX-HildaRUS Female  es-MX           16000  Standard
33     Microsoft Server Speech Text to Speech Voice (es-MX, Raul, Apollo)     es-MX-Raul-Apollo   Male  es-MX           16000  Standard
34         Microsoft Server Speech Text to Speech Voice (fi-FI, HeidiRUS)        fi-FI-HeidiRUS Female  fi-FI           16000  Standard
35         Microsoft Server Speech Text to Speech Voice (fr-CA, Caroline)        fr-CA-Caroline Female  fr-CA           16000  Standard
36      Microsoft Server Speech Text to Speech Voice (fr-CA, HarmonieRUS)     fr-CA-HarmonieRUS Female  fr-CA           16000  Standard
37        Microsoft Server Speech Text to Speech Voice (fr-CH, Guillaume)       fr-CH-Guillaume   Male  fr-CH           16000  Standard
38      Microsoft Server Speech Text to Speech Voice (fr-FR, HortenseRUS)     fr-FR-HortenseRUS Female  fr-FR           16000  Standard
39    Microsoft Server Speech Text to Speech Voice (fr-FR, Julie, Apollo)    fr-FR-Julie-Apollo Female  fr-FR           16000  Standard
40     Microsoft Server Speech Text to Speech Voice (fr-FR, Paul, Apollo)     fr-FR-Paul-Apollo   Male  fr-FR           16000  Standard
41             Microsoft Server Speech Text to Speech Voice (he-IL, Asaf)            he-IL-Asaf   Male  he-IL           16000  Standard
42           Microsoft Server Speech Text to Speech Voice (hi-IN, Hemant)          hi-IN-Hemant   Male  hi-IN           16000  Standard
43  Microsoft Server Speech Text to Speech Voice (hi-IN, Kalpana, Apollo)  hi-IN-Kalpana-Apollo Female  hi-IN           16000  Standard
44          Microsoft Server Speech Text to Speech Voice (hi-IN, Kalpana)         hi-IN-Kalpana Female  hi-IN           16000  Standard
45            Microsoft Server Speech Text to Speech Voice (hr-HR, Matej)           hr-HR-Matej   Male  hr-HR           16000  Standard
46         Microsoft Server Speech Text to Speech Voice (hu-HU, Szabolcs)        hu-HU-Szabolcs   Male  hu-HU           16000  Standard
47           Microsoft Server Speech Text to Speech Voice (id-ID, Andika)          id-ID-Andika   Male  id-ID           16000  Standard
48   Microsoft Server Speech Text to Speech Voice (it-IT, Cosimo, Apollo)   it-IT-Cosimo-Apollo   Male  it-IT           16000  Standard
49         Microsoft Server Speech Text to Speech Voice (it-IT, LuciaRUS)        it-IT-LuciaRUS Female  it-IT           16000  Standard
50    Microsoft Server Speech Text to Speech Voice (ja-JP, Ayumi, Apollo)    ja-JP-Ayumi-Apollo Female  ja-JP           16000  Standard
51        Microsoft Server Speech Text to Speech Voice (ja-JP, HarukaRUS)       ja-JP-HarukaRUS Female  ja-JP           16000  Standard
52   Microsoft Server Speech Text to Speech Voice (ja-JP, Ichiro, Apollo)   ja-JP-Ichiro-Apollo   Male  ja-JP           16000  Standard
53         Microsoft Server Speech Text to Speech Voice (ko-KR, HeamiRUS)        ko-KR-HeamiRUS Female  ko-KR           16000  Standard
54           Microsoft Server Speech Text to Speech Voice (ms-MY, Rizwan)          ms-MY-Rizwan   Male  ms-MY           16000  Standard
55         Microsoft Server Speech Text to Speech Voice (nb-NO, HuldaRUS)        nb-NO-HuldaRUS Female  nb-NO           16000  Standard
56         Microsoft Server Speech Text to Speech Voice (nl-NL, HannaRUS)        nl-NL-HannaRUS Female  nl-NL           16000  Standard
57       Microsoft Server Speech Text to Speech Voice (pl-PL, PaulinaRUS)      pl-PL-PaulinaRUS Female  pl-PL           16000  Standard
58       Microsoft Server Speech Text to Speech Voice (pt-BR, HeloisaRUS)      pt-BR-HeloisaRUS Female  pt-BR           16000  Standard
59   Microsoft Server Speech Text to Speech Voice (pt-BR, Daniel, Apollo)   pt-BR-Daniel-Apollo   Male  pt-BR           16000  Standard
60         Microsoft Server Speech Text to Speech Voice (pt-PT, HeliaRUS)        pt-PT-HeliaRUS Female  pt-PT           16000  Standard
61           Microsoft Server Speech Text to Speech Voice (ro-RO, Andrei)          ro-RO-Andrei   Male  ro-RO           16000  Standard
62     Microsoft Server Speech Text to Speech Voice (ru-RU, EkaterinaRUS)    ru-RU-EkaterinaRUS Female  ru-RU           16000  Standard
63    Microsoft Server Speech Text to Speech Voice (ru-RU, Irina, Apollo)    ru-RU-Irina-Apollo Female  ru-RU           16000  Standard
64    Microsoft Server Speech Text to Speech Voice (ru-RU, Pavel, Apollo)    ru-RU-Pavel-Apollo   Male  ru-RU           16000  Standard
65            Microsoft Server Speech Text to Speech Voice (sk-SK, Filip)           sk-SK-Filip   Male  sk-SK           16000  Standard
66             Microsoft Server Speech Text to Speech Voice (sl-SI, Lado)            sl-SI-Lado   Male  sl-SI           16000  Standard
67        Microsoft Server Speech Text to Speech Voice (sv-SE, HedvigRUS)       sv-SE-HedvigRUS Female  sv-SE           16000  Standard
68         Microsoft Server Speech Text to Speech Voice (ta-IN, Valluvar)        ta-IN-Valluvar   Male  ta-IN           16000  Standard
69           Microsoft Server Speech Text to Speech Voice (te-IN, Chitra)          te-IN-Chitra Female  te-IN           16000  Standard
70          Microsoft Server Speech Text to Speech Voice (th-TH, Pattara)         th-TH-Pattara   Male  th-TH           16000  Standard
71          Microsoft Server Speech Text to Speech Voice (tr-TR, SedaRUS)         tr-TR-SedaRUS Female  tr-TR           16000  Standard
72               Microsoft Server Speech Text to Speech Voice (vi-VN, An)              vi-VN-An   Male  vi-VN           16000  Standard
73        Microsoft Server Speech Text to Speech Voice (zh-CN, HuihuiRUS)       zh-CN-HuihuiRUS Female  zh-CN           16000  Standard
74 Microsoft Server Speech Text to Speech Voice (zh-CN, Kangkang, Apollo) zh-CN-Kangkang-Apollo   Male  zh-CN           16000  Standard
75   Microsoft Server Speech Text to Speech Voice (zh-CN, Yaoyao, Apollo)   zh-CN-Yaoyao-Apollo Female  zh-CN           16000  Standard
76    Microsoft Server Speech Text to Speech Voice (zh-HK, Tracy, Apollo)    zh-HK-Tracy-Apollo Female  zh-HK           16000  Standard
77         Microsoft Server Speech Text to Speech Voice (zh-HK, TracyRUS)        zh-HK-TracyRUS Female  zh-HK           16000  Standard
78    Microsoft Server Speech Text to Speech Voice (zh-HK, Danny, Apollo)    zh-HK-Danny-Apollo   Male  zh-HK           16000  Standard
79        Microsoft Server Speech Text to Speech Voice (zh-TW, HanHanRUS)       zh-TW-HanHanRUS Female  zh-TW           16000  Standard
80   Microsoft Server Speech Text to Speech Voice (zh-TW, Yating, Apollo)   zh-TW-Yating-Apollo Female  zh-TW           16000  Standard
81   Microsoft Server Speech Text to Speech Voice (zh-TW, Zhiwei, Apollo)   zh-TW-Zhiwei-Apollo   Male  zh-TW           16000  Standard
82        Microsoft Server Speech Text to Speech Voice (en-US, GuyNeural)       en-US-GuyNeural   Male  en-US           24000    Neural
83      Microsoft Server Speech Text to Speech Voice (en-US, JessaNeural)     en-US-JessaNeural Female  en-US           24000    Neural
84   Microsoft Server Speech Text to Speech Voice (zh-CN, XiaoxiaoNeural)  zh-CN-XiaoxiaoNeural Female  zh-CN           24000    Neural
85       Microsoft Server Speech Text to Speech Voice (it-IT, ElsaNeural)      it-IT-ElsaNeural Female  it-IT           24000    Neural
86      Microsoft Server Speech Text to Speech Voice (de-DE, KatjaNeural)     de-DE-KatjaNeural Female  de-DE           24000    Neural
87  Microsoft Server Speech Text to Speech Voice (pt-BR, FranciscaNeural) pt-BR-FranciscaNeural Female  pt-BR           24000    Neural
88     Microsoft Server Speech Text to Speech Voice (fr-CA, SylvieNeural)    fr-CA-SylvieNeural Female  fr-CA           24000    Neural
89      Microsoft Server Speech Text to Speech Voice (es-MX, DaliaNeural)     es-MX-DaliaNeural Female  es-MX           24000    Neural
90     Microsoft Server Speech Text to Speech Voice (ja-JP, NanamiNeural)    ja-JP-NanamiNeural Female  ja-JP           24000    Neural
91     Microsoft Server Speech Text to Speech Voice (ko-KR, Sun-HiNeural)    ko-KR-Sun-HiNeural Female  ko-KR           24000    Neural
92        Microsoft Server Speech Text to Speech Voice (en-GB, MiaNeural)       en-GB-MiaNeural Female  en-GB           24000    Neural
93     Microsoft Server Speech Text to Speech Voice (fr-FR, DeniseNeural)    fr-FR-DeniseNeural Female  fr-FR           24000    Neural
94    Microsoft Server Speech Text to Speech Voice (zh-CN, YunyangNeural)   zh-CN-YunyangNeural   Male  zh-CN           24000    Neural
95     Microsoft Server Speech Text to Speech Voice (en-IN, NeerjaNeural)    en-IN-NeerjaNeural Female  en-IN           24000    Neural
muschellij2 commented 4 years ago

Thanks - please add your name to DESCRIPTION and role ctb for your contributions. Closing this.