HowTo: Log TTS Server Output To Aid In TTS Server Development
1 HowTo: Log TTS Server Output To Aid In TTS Server Development
This is mostly of interest to developers of Emacspeak speech servers. This article outlines how one can log TTS server output to a file. The loggeds record all commands send by Emacspeak to the TTS server. It is best to generate the logs in an Emacs session that is separate from the Emacs session where you are developping your code. This keeps the logs short, and makes isolating problems much easier.
1.1 How It Works
The emacspeak/servers directory now contains log_<tts-name> servers for the various supported speech servers. When selected, these log-speech servers produce no speech output; instead, they output the speech server commands received from Emacspeak to a file in /tmp named tts-log-$$. Once you're done logging, you can examine this file from the primary Emacs session.
1.2 Typical Workflow
Assume you want to see the speech-server commands sent by Emacs when you perform a specific action, in this instance, pressing C-e m to execute command emacspeak-speak-mode-line.
- In a separate Linux console or X-Window, launch Emacs with Emacspeak loaded — this is separate from your primary Emacs session.
- In this Emacs session, use C-e d d (command dtk-select-server) and select log-<tts-name> as the speech server, where tts-name corresponds to the speech engine you're testing.
- Emacspeak will now start the logging server, and fall silent; all commands sent by Emacspeak to the speech-server will be logged to a file in /tmp.
- Press C-e m – to produce the log output you want to see.
- Use command _emacspeak-emergency-tts-restart to get speech back.
- Open a dired buffer on /tmp, press s to sort files by date, and find your generated log output at the top of the list.
- Note: It is useful to configure your default speech engine via Custom – see user option emacspeak-emergency-tts-server. It provides a quick-fire means to get speech back if you ever switch to a speech-server that fails for some reason.
Share And Enjoy
Created: 2015-04-15 Wed 17:33
Emacs 126.96.36.199 (Org mode 8.2.10)