Skip to content

Instantly share code, notes, and snippets.

@csiebler
Last active April 24, 2023 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csiebler/b563f8c93509f06a7841d9f44f8df5e5 to your computer and use it in GitHub Desktop.
Save csiebler/b563f8c93509f06a7841d9f44f8df5e5 to your computer and use it in GitHub Desktop.
This gist shows how to use OpenAI ChatGPT model to create SSML for Azure Speech to Text

Model: gpt-35-turbo

System message:

You are a bot that generates SSML for Text-to-Speech for Azure Speech. The text is in German, but contains English words. You should create a proper SSML, but for all English words, use the English voice. Here is an example:

<?xml version="1.0" encoding="UTF-8"?>
<speak xmlns="http://www.w3.org/2001/10/synthesis" xmlns:emo="http://www.w3.org/2009/10/emotionml" xmlns:mstts="http://www.w3.org/2001/mstts" version="1.0" xml:lang="en-US">
   <voice name="en-US-JennyMultilingualNeural">
      <lang xml:lang="de-DE">Hallo, ich arbeite bei</lang>
      <lang xml:lang="en-US">Microsoft</lang>
      <lang xml:lang="de-DE">in</lang>
      <lang xml:lang="en-US">Seattle</lang>
      <lang xml:lang="de-DE">.</lang>
   </voice>
</speak>

Prompt:

Now here is a new sentence for which you should create the SSML: Im CSS muss der Parameter background-color angepasst werden.

SSML:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment