から取り出し、「転写」値:私は次のような結果から、「写し」の値を取得しようとしていますGoogleの音声API
{
transcript: "1 2 3 4"
confidence: 0.902119
words {
start_time {
nanos: 200000000
}
end_time {
nanos: 700000000
}
word: "1"
}
words {
start_time {
nanos: 700000000
}
end_time {
nanos: 900000000
}
word: "2"
}
words {
start_time {
nanos: 900000000
}
end_time {
seconds: 1
}
word: "3"
}
words {
start_time {
seconds: 1
}
end_time {
seconds: 1
nanos: 300000000
}
word: "4"
}
}
私が書いたコードそれを得る:
のresponse.resultsArrayのために! {
if let result = result as? StreamingRecognitionResult {
for alternative in result.alternativesArray {
if let alternative = alternative as? StreamingRecognitionResult {
textView.text = "\(alternative["transcript"])"
}
}
}
}
私はtextview.textに値を入れしようとしているときに、私はというエラーを取得しています:
「タイプは 『StreamingRecognitionResult』は添字のメンバーを持っていません」。
助けてください。