使用Python获取从Azure语音到文本服务的审查词的时间戳记

问题描述 投票:0回答:1

如何通过使用Python的Azure语音到文本服务在音频文件中获取经过审查的单词(亵渎)的偏移量和持续时间(亵渎)?我可以看到转换后的文本中的脏话已加注星标,并且长度与口头单词相同。我想获得说脏话的时间戳,以便我可以使用该信息来采取诸如使音频静音的操作。

python azure speech-to-text azure-cognitive-services
1个回答
0
投票

您必须在识别中要求提供单词级时间戳。您可以找到此答案的方法:How to get Word Level Timestamps using Azure Speech to Text and the Python SDK?

几句话,您必须使用speech_config.request_word_level_timestamps()

© www.soinside.com 2019 - 2024. All rights reserved.