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

Error in my key or token when using mscstts #4

Closed ManuelSpinola closed 4 years ago

ManuelSpinola commented 4 years ago

I signed with Microsoft Azure, but when I try to run de example from the mscstts package I got the following error.

if (ms_have_tts_key()) {

  • res = ms_synthesize(
  • script = "hey, how are you doing? I'm doing pretty good",
  • output_format = "audio-16khz-128kbitrate-mono-mp3")
  • tmp <- tempfile(fileext = ".mp3")
  • writeBin(res$content, con = tmp)
  • mp3 = tuneR::readMP3(tmp)
  • }

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

muschellij2 commented 4 years ago

When you say you "signed with Microsoft Azure" - what do you mean? Did you set up an API key? See https://github.com/muschellij2/mscstts#getting-an-api-key Best, John

On Tue, Mar 31, 2020 at 10:20 AM ManuelSpinola notifications@github.com wrote:

I signed with Microsoft Azure, but when I try to run de example from the mscstts package I got the following error.

if (ms_have_tts_key()) {

  • res = ms_synthesize(
  • script = "hey, how are you doing? I'm doing pretty good",
  • output_format = "audio-16khz-128kbitrate-mono-mp3")
  • tmp <- tempfile(fileext = ".mp3")
  • writeBin(res$content, con = tmp)
  • mp3 = tuneR::readMP3(tmp)
  • }

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/muschellij2/mscstts/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGPLRRMK56G52B6OBLY7TRKH33XANCNFSM4LXS555A .

ManuelSpinola commented 4 years ago

Thank you very much John.

Yes, they gave me an api key and a token, but I don´t know how to use it.

Manuel

muschellij2 commented 4 years ago

You're welcome, closing now.