Is there a selection to remove punctuation marks from the results when using the speech to text function?

连博10335043 65 Reputation points
2024-08-08T01:42:48.0966667+00:00

Like ,if the results is "Beijing is very beautiful, I love it too much! what about you?",I want convert to "Beijing is very beautiful I love it too much what about you".

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

Accepted answer
  1. AshokPeddakotla-MSFT 35,971 Reputation points Moderator
    2024-08-21T14:03:49.5266667+00:00

    连博10335043 Sincere apologies for the delayed response.

    You can set the speech recognition result to detailed and it will give all formats as mentioned here.

    Also, check Transcriptions - Submit - REST API (Azure Azure AI Services) | Microsoft Learn

    In submit transcriptions api, the body contains TranscriptionProperties where punctuationMode can be set to None.

    See a sample request and response here.

    {
      "parameters": {
        "Endpoint": "https://westus.api.cognitive.microsoft.com/",
        "Ocp-Apim-Subscription-Key": "{API Key}",
        "transcription": {
          "contentUrls": [
            "https://contoso.com/mystoragelocation",
            "https://contoso.com/myotherstoragelocation"
          ],
          "properties": {
            "diarizationEnabled": false,
            "wordLevelTimestampsEnabled": false,
            "displayFormWordLevelTimestampsEnabled": false,
            "punctuationMode": "None",
            "profanityFilterMode": "Masked"
          },
          "locale": "en-US",
          "displayName": "Transcription using default model for en-US"
        },
        "Content-Type": "application/json"
      },
    
    

    Do let me know if that helps or have any further queries.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 35,971 Reputation points Moderator
    2024-08-08T02:45:21.92+00:00

    连博10335043 Greetings & Welcome to Microsoft Q&A forum!

    Are you using any SDK?

    For continuous recognition (only), the setting would be enabled with: speechConfig.EnableDictation(); reference: https://learn.microsoft.com/en-us/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig?view=azure-node-latest#microsoft-cognitiveservices-speech-sdk-speechconfig-enabledictation

    Otherwise, for non-continuous recognition, it must be set with: speechConfig.SetServiceProperty("punctuation", "explicit", ServicePropertyChannel.UriQueryParameter); reference: Azure-Samples/cognitive-services-speech-sdk#667 (comment)

    Do let me know if that helps or have any further queries.


  2. 连博10335043 65 Reputation points
    2024-08-08T02:58:07.31+00:00

    000000000000000000000

    0 comments No comments

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.