text to speech - Cancel Windows Phone SpeechSynthesizer -


my app calling speechsynthesizer.speaktextasync multiple time, of text add queue before spoken. want give user ability cancel speech , discard eveyything that's still in queue.

i tried calling either speechsynthesizer.cancelall or speechsynthesizer.dispose , app crash when either of methods called.

i've looked @ cancel speech synthesis in windows phone 8 since app add multiple speech queue, task.cancel doesn't seem work.

well, according documentation, when call cancellall, you're cancelling tasks executing asynchronously. contract, results in operationcancelledexception being thrown. means wherever call speaktextasync, speakssmlasync or speakssmlfromuriasync, must surround these calls try/catch statement prevent exception going uncaught.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -