mbrola: Fix portuguese and french voices priorities
- We want to use br* voices in priority for Brazilian Portugues, but not
for general Portuguese.
- We want to use ca* and Belgian voices for Canadian and Belgian French,
but rather not for general French.
Use ESPEAKNG_DEFAULT_VOICE instead of hard coded "en".
This will make it easier to set a default voice other than
English. This is important for cases when a language will fall back to
the default voice.
Some references to L('e', 'n') still need to be changed.
Found by parsing the results from this bash script:
for define in $(grep define *.h | awk'{print $2}');
do if ! grep -q $define *.c
then
echo "$define not found";
fi
done
code cleanup: don't add a \0 to voices_language in LoadVoice().
This is unnecessary since the string is already null terminated in the
V_LANGUAGE switch case. sscanf creates a null terminated string in
language_name, which is then copied to voice_language by strcpy (keeping
the \0).
It's probably unnecessary code and could be removed. However, it would
break tests. This is a temporary solution.
The solution is to do it once in VoiceReset() and then if the "formant"
keyword changes voice->width.
Substitute using existing defined done of ReadableStreamDefaultReader.read() for value.length < this.channelDataLength &&
(await this.inputReader.read()).done to verify all input stream bytes are written
- Verify last bytes of input stream are written to audio output stream before disconnecting audio nodes
- Start MediaRecorder before first AudioData is written to audio output stream
- Include error handling in disconnect() and abortHandler for abort() called immediately following start() for case of close() called on a closed stream
- Check if data set in recorder dataavailable event is defined before calling data.arrayBuffer()