Rayees
Rayees

Reputation: 111

Get timestamps of censored words from Azure Speech to Text Services using Python

How can I get the offset and duration of the censored words (profanity) in an Audio file with Azure Speech to Text Services using Python? I can see that the swearing words in the converted text are starred and have the same length as the spoken words. I wanted to get the timestamp at which the swearing words are spoken so that I can use the information to take actions like muting the Audio.

Upvotes: 0

Views: 552

Answers (1)

Nicolas R
Nicolas R

Reputation: 14619

You have to request for word-level timestamp in your recognition. You can find how with this answer: How to get Word Level Timestamps using Azure Speech to Text and the Python SDK?

In a few words, you have to use speech_config.request_word_level_timestamps()

Upvotes: 1

Related Questions