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()
I went through the conjunctions and prepositions listed in the Ambar
Eldaron Quenya Dictionary [1] and the Omikhleia Sindarin Dictionary [2]
and added all the ones with a single light syllable to the list as
unstressed (with one exception). I think this improves the way some
texts are read a little bit (though I have to admit I find it hard to
tell the difference).
[1]: https://ambar-eldaron.com/telechargements/quenya-engl-A4.pdf
[2]: https://www.jrrvf.com/hisweloke/sindar/index.html
Switch to Quenya when encountering ⟨q⟩ in Sindarin
In Sindarin, ⟨q⟩ or ⟨qu⟩ do not occur, so if we encounter it, the word
must actually be Quenya. Let’s be user-friendly and switch to Quenya in
that case (though I’m not sure how common it would be to encounter a
single Quenya word in a Sindarin text – I suspect it would be more
likely that the user chose the wrong language and really the entire text
is in Quenya).
According to the Tolkien Gateway article on Qenya [1], Tolkien used ⟨q⟩
to represent [kʷ] before the writing of The Lord of the Rings (during
which he decided to use ⟨qu⟩ instead). Let’s support it, in case someone
wants to use eSpeak NG to pronounce names from the earlier volumes of
the History of Middle-earth.
[1]: http://tolkiengateway.net/wiki/Qenya
According to Appendix E of The Lord of the Rings, ⟨k⟩ is used with the
same value as ⟨c⟩ in names from non-Elvish languages (both representing
/k/). However, in the Silmarillion, ⟨k⟩ is also used in some Elvish
names, such as Tulkas and Kementári, as well as in some words in the
Appendix (Elements in Quenya and Sindarin Names), e.g. kir- as an
element or root in Calacirya, Cirth, and other words. And in earlier
versions of the language (when Quenya was called Qenya and Sindarin
Gnomish), ⟨k⟩ also often occurs. Therefore, let’s support it as an
alternative spelling of ⟨c⟩.
Currently, eSpeak NG doesn’t seem to do the two-step replacement of
⟨kh⟩→⟨ch⟩→⟨x⟩, which means that ⟨kh⟩ is ultimately pronounced as /kh/
(or /kʰ/?) rather than [χ]; according to Appendix E, this is correct in
Dwarvish, while in Orkish and Adûnaic ⟨kh⟩ should be equivalent to ⟨ch⟩.
Since we’re not really aiming for pronouncing any of these languages,
either way is fine.