KokoroSharp
KokoroSharp copied to clipboard
Assign "ESPEAK_DATA_PATH" using indexer instead of .Add()
Proposed fix for https://github.com/Lyrcaxis/KokoroSharp/issues/58
StartInfo.EnvironmentVariables.Add() can throw if the environment variable already exists. The proposed fix uses the indexer to clobber whatever might be in place and assign the value anyway.
Another solution would be to check if the variable already exists using .ContainsKey() then .Remove() it before calling .Add()