Resource not found when making API call to text-to-speed service

FU SHIJIE 0 Reputation points
2025-11-27T13:04:25.3+00:00

Tested it out on Postman:

API key is added to header already

Headers & body are structured like below:

User's image

User's image

Got this error: 404 Resource Not Found

Also tried with speechsdk on Python, with the same API key and service region, i'm able to get speed synthesised

Any tips are much appreciated

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Aryan Parashar 3,380 Reputation points Microsoft External Staff Moderator
    2025-11-28T08:34:34.86+00:00

    Hi FU SHIJIE,**
    **Thank you for reaching out! I understand you're working on getting Text-to-Speech set up, and I'm here to help make this process as smooth as possible for you.

    Azure Text-to-Speech works in two simple steps, and I'll walk you through each one:
    Step 1: Get Your Authorization Token

    Method: POST

    URL: https://YOUR_REGION.api.cognitive.microsoft.com/sts/v1.0/issuetoken

    Example: https://eastus.api.cognitive.microsoft.com/sts/v1.0/issuetoken

    Headers:

    Ocp-Apim-Subscription-Key: YOUR_AZURE_SPEECH_KEY 
    Content-Length: 0
    

    Body: Leave this empty.

    Once you click Send, you'll receive a long token string in the response body. This is your Bearer token - just copy it for the next step.
    User's image

    Step 2: Create Your Text-to-Speech Request

    Method**:** POST

    URL: https://YOUR_REGION.tts.speech.microsoft.com/cognitiveservices/v1

    Example: https://eastus.tts.speech.microsoft.com/cognitiveservices/v1

    Headers:

    Authorization: Bearer <speech_token> 
    Content-Type: application/ssml+xml 
    X-Microsoft-OutputFormat: riff-16khz-16bit-mono-pcm 
    User-Agent: Bruno-TTS 
    

    Body → Select "Raw" and paste this SSML:

    <speak version="1.0" xml:lang="en-US">
      <voice name="en-US-JennyNeural">
        Hello! This audio was generated using Azure Text to Speech and Bruno.
      </voice>
    </speak>
    

    After clicking Send, you'll receive your audio file in the response!:
    User's image

    Please accept this as an answer.
    Thank you for using Microsoft Q&A Portal, and happy coding!😊

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.