Text To Speech

by minimal

In-game text to speech; preview, global chat and speaker blueprint generation modes.

Tweaks
5 years ago
0.15 - 0.17
16

b Wrong Instrument Selected

7 years ago
(updated 7 years ago)

Hey again minimal!

I found another bug, this one probably isn't an API limitation. One of the mods I'm using (Soundpack: alerts and sirens, link: https://mods.factorio.com/mods/Arcitos/Soundpack-alerts-and-sirens) adds another category of sounds for speakers, labeled alerts 2. With this mod and yours in use, it appears as though the blueprint chooses the wrong instrument.

I did some digging, and I believe the issue is how you're searching for the right instrument in getCompatibleVoiceInstrumentId, line 245 - 255 in textToSpeechGui.lua.

My reasoning behind this:
1. It picks steel drums, which is one index behind male voice in the dropdown
2. Mods load by rank (dependency related if I remember correctly), after which mods load in alphabetical order, meaning that the other mod loads before yours, taking the first custom instrument index/shifting another instrument to that index

This would imply that the getCompatibleVoiceInstrumentId() function is defaulting to the index based search rather than the string based one. It could be something else, but that's just what I've thought of/found so far.

Regardless, thanks for the great mod, as well as all the effort you've poured into it! I just recently made a mod myself (albeit a crappy one), so I now have an even greater appreciation for what you've done here.

7 years ago

For those interested, this issue was resolved on Github (https://github.com/Minimal-C/FactorioTextToSpeech), the fix is present in v0.1.3.

Thanks again lhoto

New response