In the case of some versions of NeoSpeech TTS, if it receives a RTSP TEARDOWN without a preceding MRCP STOP before it, then it does not release the licensed port.
This change ensures that the licensed TTS port is fully released by sending a MRCP STOP prior to the RTSP TEARDOWN.
This is the lazy but hopefully comprehensive approach to ensuring that the TTS channel is cleanly and fully stopped before sending a TEARDOWN.
In the case of some versions of NeoSpeech TTS, if it receives a RTSP TEARDOWN without a preceding MRCP STOP before it, then it does not release the licensed port.
This change ensures that the licensed TTS port is fully released by sending a MRCP STOP prior to the RTSP TEARDOWN.
This is the lazy but hopefully comprehensive approach to ensuring that the TTS channel is cleanly and fully stopped before sending a TEARDOWN.
I say "lazy", because this approach will inevitably cause
speech_channel_stop()
to be invoked twice in some cases. However, this is completely innocuous in such cases, because the method will exit much like a no-op if synth is not active, such as when the method has already been called.