0

コンテキストとして、録音されたナレーションをオーディオ ストリームとして使用するスキルを構築しています。

  • ナレーションの 1 つで、ユーザーに質問が提示されます (ナレーションの一部として記録されます)。
  • を使用してキャプチャされたユーザーの意図this.response.listen()により、次に再生するナレーションのセットが決定されます。

私の問題は次のとおりです。スキルの一部でオーディオ再生が必要なため、AudioPlayerInterfaces. 次の部分でエラーが発生します (以下のコードとコメントを参照してください)。

var audioEventHandlers = {
  'PlaybackStarted': function() {
    this.emit(':responseReady');
  },
  'PlaybackFinished': function() {
    if (currentStream.keyName === 'intro') {
      this.response.listen(); //<-- this line causes the error
    }
    this.emit(':responseReady');
  }, //additional handler code omitted as not relevant

具体的には、次のエラーがトリガーされthis.response.listen()ます。

"error": {
            "type": "INVALID_RESPONSE",
            "message": "The following directives are not supported: Response may not contain an reprompt,Response may not have shouldEndSession set to false"
        },

他のスキルが録音を利用し、その後に.listen()プロンプ​​トが表示されるのを見たことがあるので、これが技術的に実現可能であることはわかっています。私はこれにどのようにアプローチすべきか疑問に思っていましたか?

ありがとう!

4

0 に答える 0