我想联系SpeechRegions在英吉利海峡的数据。当我编写"console.log(speech.Channels)“时,我可以在下面看到这个json数据。但是当我写"console.log(speech.Channels.SpeechRegions)“时,它给了我一个未知数。你能给我解释一下原因吗?
Channels: [
{
SilenceRegions: [],
SpeechRegions: [Array],
SilenceDuration: 0,
SpeechDuration: 8.68,
SilenceRatio: 0,
SpeechRatio: 1,
InterruptCount: 0,
Channel: 0
}
],发布于 2021-06-01 07:32:19
您的json嵌套在数组中。
频道:[]
因此,您需要引用数组中的第一个元素:
频道
然后请参阅:
Channels.SpeechRegions
发布于 2021-06-01 07:35:26
由于speech.Channels是一个数组( []在Channels:之后请注意,您必须使用如下所示的索引:
speech.Channels[0].SpeechRegions另外,只有当结果可能有多个json对象时才使用数组。
发布于 2021-06-01 07:58:37
必须在通道数组中给出通道对象的索引,才能得到对象的支柱值
speech.Channelsindex.SpeechRegions
https://stackoverflow.com/questions/67784387
复制相似问题