OhMyGPT API Docs
  1. Azure API
OhMyGPT API Docs
  • About This site
  • About new website
  • Midjourney Open API
    • About Midjourney Service
    • Midjourney Blend Image Generation Task Creation
      POST
    • Midjourney Text-to-Image Task Creation
      POST
    • Midjourney Execute Action Task Creation
      POST
    • Midjourney Query Specific Task ID Execution Status
      POST
    • Midjourney Paginated Bulk Query Tasks
      POST
    • Midjourney Describe Prompt Extraction Task Creation
      POST
    • Retrieve Images Generated by Midjourney from Object Storage
      GET
    • Retrieve Compressed Images Generated by Midjourney from Object Storage + WSRV
      GET
    • Retrieve Images Generated by Midjourney from Object Storage + WSRV
      GET
    • Proxy Discord Images via WSRV
      GET
    • Proxy and Compress Discord Images via WSRV
      GET
  • Management API
    • Create a New API Key
      POST
    • Update API Key Information
      POST
    • Query All of User's API Keys
      POST
    • Delete Specified API Key
      POST
    • Query User Membership Expiration Date
      POST
    • User Balance Query
      POST
    • Query the current model rates
      GET
  • OpenAI
    • About OpenAI Compatible API
    • About Azure OpenAI API
    • Audio
      • Text To Speech API
    • Chat
      • Chat Completion
      • Completion (Legacy)
    • Images
      • Create Image
    • Realtime API
  • Anthropic Claude
    • Deprecated
      • ChatCompletions
      • Claude2 API
    • Anthropic Official Claude API
  • Policies
    • Terms of Service
    • Privacy Policy
  • Other OpenAPIs
    • Search API
      • Google Custom Search API
      • Google Search By Serper
    • Azure API
      • Get Azure TTS voice list
        GET
      • Azure TTS
        POST
  1. Azure API

Azure TTS

POST
/api/v1/azure/tts
You can access Azure's neural speech model through this API, enabling the functionality of converting text into audio. (You must enable the azure-tts-1 permission on your API key to use this API.)
Regarding the input parameter, you can either put plain text in this interface and set some parameters, and the server will wrap it into SSML-formatted text before sending it to the Azure TTS API, or you can set isSSML to true and provide the SSML-formatted string directly, at which point the other parameters won't work.
Note that this API cannot handle long strings, you should try to control the length of your input, it cannot generate audio longer than 10min.
Pricing:
The final coins consumption is: the char length of the input string * 5
Reference:
For more information about SSML, refer to SSML.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/x-www-form-urlencoded
input
string 
required
The input for your TTS request
Example:
Hello there! I hope you're having an amazing day so far. It's always a pleasure to connect with new people and share experiences. Looking forward to getting to know you better! Cheers!
voiceShortName
string 
required
Azure TTS short name, you can get all voice short name from another API
Example:
en-US-JennyNeural
isSSML
string 
optional
dose input is SSML format, Default: false
Example:
false
rate
string 
optional
Example:
1
pitch
string 
optional
Example:
1
style
string 
optional
Example:
excited
role
string 
optional
Example:
YoungAdultFemale

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.ohmygpt.com/api/v1/azure/tts' \
--data-urlencode 'input=Hello there! I hope you'\''re having an amazing day so far. It'\''s always a pleasure to connect with new people and share experiences. Looking forward to getting to know you better! Cheers!' \
--data-urlencode 'voiceShortName=en-US-JennyNeural' \
--data-urlencode 'isSSML=false' \
--data-urlencode 'rate=1' \
--data-urlencode 'pitch=1' \
--data-urlencode 'style=excited' \
--data-urlencode 'role=YoungAdultFemale'

Responses

🟢200OK
application/json
Body
object {0}
Example
{}
Previous
Get Azure TTS voice list
Built with