There are currently recurrent problems with Praat audio on Linux. While these are dealt with by the maintainers of Praat, I have added a way to specify an alternative way to record audio to work around this problem.
Make sure you have a recorder installed that can be called from the command line. This example will use
arecord (Alsa, Linux) and
rec (
Sox, macintosh).
https://jordilin.wordpress.com/2006/07/28/howto-recording-audio-from-the-command-line/In your home directory, locate the following settings directory. If you
cannot find it, start up SGC and close it again once. The directory
should have been created.
Linux:
.SpeakGoodChinese2/TTS
Mac OSX*:
~/Library/Preferences/SpeakGoodChinese2/TTS
Create the file with the name below in this directory:
Linux:
TTS_UNIX_record_command.txt
Mac:
TTS_OSX_record_command.txt
Start the file with a single line of text:
Linux:
arecord -q -f cd -r 44100 -c 1 -t wav /tmp/SpeakGoodChinese/SCRATCH.wav -d
Mac OSX:
/opt/local/bin/rec -q -c 1 -t wav "/tmp/SpeakGoodChinese/SCRATCH.wav" trim 0
Make sure you store the recorded audio as:
/tmp/SpeakGoodChinese/SCRATCH.wav, or else SGC will not be able to find it. Note that the position of the duration of the recorder after
-d (
arecord) or at the end of the line (
rec) is left blank. SGC will fill this value.
You
can change the recording parameters to your liking. It might work with
other recorders. But they should record when called as:
<your command line> <number of seconds>
From this moment on, SpeakGoodChinese will use this command to record speech. Currently, I have not been able to get this tested under Windows.