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 * 5Reference: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
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'