Sitelet https://github.com/microsoft/MixedRealityToolkit-Unity/pull/338
Skip to content

Adding StopSpeaking() to TextToSpeechManager - #338

Merged
David Kline (david-c-kline) merged 9 commits into
microsoft:masterfrom
keveleigh:master
Nov 23, 2016
Merged

David Kline (david-c-kline) merged 9 commits into
microsoft:masterfrom
keveleigh:master

Conversation

@keveleigh

Copy link
Copy Markdown
Contributor

Requested here (and I think this is useful!): https://forums.hololens.com/discussion/3107/how-do-i-stop-the-tts-from-speaking-in-the-holotoolkit?

Checks to see if the AudioSource is playing and, if it is, stops it. This allows the user to cancel TTS playback mid-stream, without having to keep track of the AudioSource outside TextToSpeechManager.

@NeerajW

Copy link
Copy Markdown

Is there a test scene where you can call this function?

@keveleigh

Kurtis (keveleigh) commented Nov 22, 2016 •

Copy link
Copy Markdown
Contributor Author

You bet 😜 I forgot to add it before.

Which also reminded me of a previous Issue about passing the AudioSource's IsPlaying through via an IsSpeaking method. I had to manually track that, and actually there's a bug in my test scene...fix incoming...

@keveleigh

Copy link
Copy Markdown
Contributor Author

Fix is in

/// Stops text-to-speech playback.
/// </summary>
public void StopSpeaking()
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: should this be if(IsSpeaking())

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that'd make the code more concise! Incoming...

@david-c-kline
David Kline (david-c-kline) merged commit ca49669 into microsoft:master Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants