title: Azure Cognitive Service TTS Custom Voice endpoint testing
body: <p>I have a node.js TTS Azure Cognitive Service which works great.  (<a href="https://github.com/jishi/node-sonos-http-api" rel="nofollow noreferrer">https://github.com/jishi/node-sonos-http-api</a>).  I am able to use Neural voices in EASTUS and everything works great. </p>
  
  <p>I have just gone through the process of creating a Custom Voice.  The portal shows the Custom Voice Model and Endpoint both successfully deployed.  I can use the Check endpoint Test and in the portal, it speaks like my custom voice should.  </p>
  
  <p>But when I modify the node.js code (with the new BASEURL and URI and Voice) I get 400 errors.  </p>
  
  <p>So back to basics. I was using PowerShell to simply try to see if the EndPoint is working.</p>
  
  <p>When I do the following to test the regular voices...</p>
  
  <pre><code>$FetchTokenHeader = @{
    'Content-type'='application/x-www-form-urlencoded';
    'Content-Length'= '0';
    'Ocp-Apim-Subscription-Key' = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'}
  
  $OAuthToken = Invoke-RestMethod -Method POST -Uri https://eastus.api.cognitive.microsoft.com/sts/v1.0/issuetoken -Headers $FetchTokenHeader
  
  # show the token received
  $OAuthToken
  
      $headers = @{'Authorization'='Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'}
  
  Invoke-RestMethod -Method GET -Uri https://eastus.tts.speech.microsoft.com/cognitiveservices/voices/list -Headers $headers
  </code></pre>
  
  <p>Works great.  I see all the list of available voices. </p>
  
  <p>When I change to </p>
  
  <pre><code>Invoke-RestMethod -Method GET -Uri https://eastus.voice.speech.microsoft.com/cognitiveservices/v1?deploymentId=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -Headers $headers
  </code></pre>
  
  <p>To check if my voice is available (<a href="https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-text-to-speech#custom-voices" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-text-to-speech#custom-voices</a>),  I get The remote server returned an error: (404) Not Found.  But in the Custom Voice Portal, under Deployment, the Endpoint is deployed.  The Subscription Key is the same (all under the same subscription that is working for regular voices).  The Datacenter EASTUS is the same.  </p>
  
  <p>Any suggestions on why the Custom Voice endpoint might not be working?  Thanks!</p>