Who can provide assistance?The time required for speech to text processing on the same file varies greatly, with a maximum of around 40%. Is Azure's performance like this?

连博10335043 65 Reputation points
2024-07-30T01:59:25.77+00:00

Like the annex

The first test ,it took approximately 8.5 seconds.first_test_log.txt

But,it only took approximately 5 seconds for the second test.Second_test_log.txt

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
2,036 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,559 questions
{count} votes

Accepted answer
  1. navba-MSFT 27,530 Reputation points Microsoft Employee Moderator
    2024-08-16T08:22:48.2033333+00:00

    @连博10335043 Thanks for getting back. here is the updated Python code which used the FAST transcription API:

    import requests
    import time
    
    url = "https://westeurope.api.cognitive.microsoft.com/speechtotext/transcriptions:transcribe?api-version=2024-05-15-preview"
    headers = {
        "Accept": "application/json",
        "Ocp-Apim-Subscription-Key": "62cXXXXXXXXX65c6c"
    }
    files = {
        "audio": open("voiceBig.wav", "rb"),
        "definition": (
            None,
            '{"locales":["zh-CN"], "profanityFilterMode": "Masked", "channels": [0,1]}',
            "application/json"
        )
    }
    
    # Start the timer
    start_time = time.time()
    response = requests.post(url, headers=headers, files=files)
    
    # Stop the timer
    end_time = time.time()
    
    # Calculate the time taken
    time_taken = end_time - start_time
    
    
    print(f"Response: {response.json()}")
    print(f"Time taken: {time_taken} seconds")
    

    Hope this helps.

    1 person found this answer helpful.

0 additional answers

Sort by: Most 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.