我有一个Play块,它说许多.mp3文件(它读取帐户余额和其他有关帐户的信息。
结果是需要一段时间才能收听的消息。消息的长度各不相同,具体取决于所说的内容。
我喜欢'任何'键结束播放消息并跳回c#。
我尝试使用Gather,但是超时值要么截断Say块,要么在最后等待年龄(如果没有按下键)
有关如何实现这一点的想法吗?
目前的流程如下:
<?xml version="1.0"?>
<Response>
<Play>/Voice/test/messages/CurrentlyYourPAYGBalanceIs_.mp3</Play>
<Play>/Voice/test/common/numbers/78.mp3</Play>
<Play>/Voice/test/common/currency/_pounds_.mp3</Play>
<Play>/Voice/test/common/misc/_and_.mp3</Play>
<Play>/Voice/test/common/numbers/91.mp3</Play>
<Play>/Voice/test/common/currency/Pence.mp3</Play>
<Play>/Voice/test/messages/_AndYouHavea_.mp3</Play>
<Play>/Voice/test/products/BD021.mp3</Play>
<Play>/Voice/test/common/misc/_with_.mp3</Play>
<Play>/Voice/test/common/numbers/95.mp3</Play>
<Play>/Voice/test/messages/_VoiceBalance.mp3</Play>
<Play>/Voice/test/common/misc/_and_.mp3</Play>
<Play>/Voice/test/common/numbers/2.mp3</Play>
<Play>/Voice/test/common/data/_gigabytes_.mp3</Play>
<Play>/Voice/test/common/numbers/200.mp3</Play>
<Play>/Voice/test/common/misc/_and_.mp3</Play>
<Play>/Voice/test/common/numbers/94.mp3</Play>
<Play>/Voice/test/common/data/_megabytes_.mp3</Play>
<Play>/Voice/test/common/misc/_remaining.mp3</Play>
<Play>/Voice/test/common/misc/Expiring_.mp3</Play>
<Play>/Voice/test/common/dates/31.mp3</Play>
<Play>/Voice/test/common/months/_of12_.mp3</Play>
<Play>/Voice/test/common/years/2016.mp3</Play>
</Response>
答案 0 :(得分:2)
大卫,看看这个问题:
具体来说:
播放是可中断的,因为它包含在
Gather
中 到Pause
行动。