question

margotmg-5583 avatar image
0 Votes"
margotmg-5583 asked GiftA-MSFT edited

Azure multiple files recognition and confidence

hi!
So I'd like to transcribe multiple audio files using a customized model from Azure and continuous speech recognition. I don't want to use the batch transcription, I want to transcribe multiple files from my computer simultaneously. Is this possible using the python script shown here? https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?tabs=windowsinstall&pivots=programming-language-python

Every time I try to test more than one audio file simultaneously I get the following error:

RuntimeError: Exception with an error code: 0x8 (SPXERR_FILE_OPEN_FAILED)
[CALL STACK BEGIN]

Also, I'm trying to get the confidence per word. Is this possible in python? I've seen this command in other questions but doesn't seem to work.

config.output_format = speechsdk.OutputFormat(1)

Maybe it's doing something but it doesn't return anything?

azure-speech
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

GiftA-MSFT avatar image
1 Vote"
GiftA-MSFT answered GiftA-MSFT edited

Hi, thanks for reaching out. One approach could be to loop through files in a directory and then transcribe. Regarding getting confidence per word, I only found examples for C#, I'm making some inquiries and will share updates for python accordingly.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks! The loop worked.

Apart from the confidence per word, is there a way to get the type or error?
When running tests in Speech Studio, Azure returns the percentage of error for the tested model and the types or errors committed (substitution, deletion or insertion). Is it possible to get this info in Python as well?

Thanks

0 Votes 0 ·

Hi, for confidence per word, try setting the following property in your speech config as shown below.

Example:

 import azure.cognitiveservices.speech as msspeech
 config.set_service_property(name='wordLevelConfidence', value='true', channel=msspeech.ServicePropertyChannel.UriQueryParameter)


0 Votes 0 ·