Skip to content

Error thrown by assigning "ESPEAK_DATA_PATH" in Phonemize_Internal #58

@Brolijah

Description

@Brolijah

I specifically encountered this while I was testing my app under proton... I'm not sure what chain of execution led to these circumstances, but the error was easy to narrow down.

System.ArgumentException: Value does not fall within the expected range.
    at System.Collections.Specialized.StringDictionaryWrapper.Add(String key, String value)
    at KokoroSharp.Processing.Tokenizer.Phonemize_Internal(String text, String& originalSegments, String langCode)
    at KokoroSharp.Processing.Tokenizer.<>c__DisplayClass21_0.<Phonemize>b__0(String text)
    at System.Linq.Enumerable.ArraySelectIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
    at System.Linq.Enumerable.ArraySelectIterator`2.ToList()
    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
    at KokoroSharp.Processing.Tokenizer.Phonemize(String inputText, String langCode, Boolean preprocess)
    at KokoroSharp.Processing.Tokenizer.Tokenize(String inputText, String langCode, Boolean preprocess)

The offending line seems to be here:

process.StartInfo.EnvironmentVariables.Add("ESPEAK_DATA_PATH", @$"{eSpeakNGPath}/espeak-ng-data");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions