我正在使用最新的python库的google (0.35.0),我得到的结果如下,第一个转录结果的单词在第二个转录结果中被重复,等等直到结束。在先前的版本中,情况并非如此(0.34.0)
参考源代码。
源代码:
config = speech.types.RecognitionConfig(
encoding=enums.RecognitionConfig.AudioEncoding.FLAC,
sample_rate_hertz=48000,
language_code='en-US',
alternative_language_codes={'en-IN'},
# max_alternatives=10,
profanity_filter=True,
enable_word_time_offsets=True,
enable_word_confidence=True,
enable_automatic_punctuation=True,
enable_speaker_diarization=True,
diarization_speaker_count=5,
#model="video",
use_enhanced=True)结果:
results {
alternatives {
transcript: "start"
confidence: 0.632519185543
words {
start_time {}
end_time {
seconds: 5
nanos: 900000000
}
word: "start"
confidence: 0.655210196972
speaker_tag: 1
}
}
}
.....
.....
.....
results {
alternatives {
transcript: "end"
confidence: 0.632519185543
words {
start_time {}
end_time {
seconds: 5
nanos: 900000000
}
word: "start"
confidence: 0.655210196972
speaker_tag: 1
}
words {
start_time {
seconds: 129
nanos: 300000000
}
end_time {
seconds: 130
nanos: 400000000
}
word: "end"
confidence: 0.624447464943
speaker_tag: 1
}
}
}问题:
发布于 2019-01-09 00:40:14
看起来Google在他们的文档中注意到了类似的东西
注:当这是正确的,我们发送所有的文字从音频开头的顶部选择在每一个连续的回应。这样做是为了改善我们的说话人标签,因为我们的模型学习识别说话人在谈话中随着时间的推移。
https://stackoverflow.com/questions/51519720
复制相似问题