In the Color Text as SpeakLine Speaks It challenge, I found something interesting with the SpeechSynthesizer and I’m not sure if it’s a bug or a feature.
I started at the end of the challenge first and implemented the updateTextField function. I called the function in the most logical place, in the calculated isStarted variable declaration. When I run the program, the textField does not disable while the speech is occurring. However, when I put breakpoints in at the function call or within the function itself (and then click the continue processing arrow), THEN the text field disables until the speech completes. It then re-enables properly.
I tried moving the call to the function in other locations, but had no success no matter what I tried.
Either I need to implement a delay or there’s a sync problem. Note, the language I’m using is English.
Any ideas? This one has left me scratching my head.