Save proper external voice IDs in model files#1000
Open
somewhatlurker wants to merge 2 commits intoDeviationTX:masterfrom
Open
Save proper external voice IDs in model files#1000somewhatlurker wants to merge 2 commits intoDeviationTX:masterfrom
somewhatlurker wants to merge 2 commits intoDeviationTX:masterfrom
Conversation
uses "mp3-" prefix to avoid potential issues from loading old models with new logic (all models will be saved with new IDs)
Contributor
|
From a quick glance this looks good. I actually like the idea of using the mp3-prefix. This could also be the way to enhance functionality by adding a "beep" prefix to set certain alerts to the beeps defined in sound.ini and making that somehow configurable in the voice config menu. Maybe also an option to integrate vibration setting per alert? Or a combination of them? We at least should be discussing things so we're not losing backwards compatibility in the future. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is one possible fix for #999.
If merged, model files will now save the alert IDs from voice.ini/mp3 file names for custom alerts, instead of the internal index in voice_map.
To ensure old models are loaded correctly, an "mp3-" prefix is added to alert values saved in the new way (all models will be saved with new IDs).
This does have a side effect of making new model files incompatible with old firmware though. Alternatives would be to either not use a prefix and make it possible for old models to load with incorrect IDs when used with a poorly formatted voice.ini (probably not desirable) or use a prefix/suffix that atoi won't error out on (eg, "+" prefix), although that would make the file less readable without writing an explanation comment.