Azure TTS - what is the difference between "speak-text-async" and "speak_async"

Ananth Hegde (anahegde) 20 Reputation points
2024-11-26T13:24:21.3233333+00:00
Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,078 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pavankumar Purilla 8,665 Reputation points Microsoft External Staff Moderator
    2024-11-26T18:45:23.12+00:00

    Hi Ananth Hegde (anahegde),

    Greetings & Welcome to Microsoft Q&A forum! Thanks for posting your query!
    I understand your query about the difference between 'speak-text-async' and 'speak_async.

    Differences between speak_text_async and speak_async in the SpeechSynthesizer class:
    speak_text_async:

    Purpose: This method is designed specifically for synthesizing speech from plain text strings asynchronously.

    Input: Accepts a single text string as input.

    Use Case: Ideal for straightforward scenarios where only plain text needs to be converted into speech.

    speak_async:

    • Purpose: This method provides greater flexibility, allowing you to synthesize speech from a SpeechSynthesisRequest asynchronously.
    • Input: Accepts a SpeechSynthesisRequest, which can include additional configuration, such as plain text, SSML (Speech Synthesis Markup Language), or other custom inputs.
    • Use Case: Suitable for advanced scenarios that require more control over the input, such as using SSML for fine-tuned speech output.

    The speak_async method is not available in the Java SDK for Azure Speech at this time.

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful.


Your answer

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