unity-sentis
ONNX
PB Unity commited on
Commit
73f2382
1 Parent(s): 619aa73

Upload RunJets.cs

Browse files
Files changed (1) hide show
  1. RunJets.cs +4 -3
RunJets.cs CHANGED
@@ -81,8 +81,8 @@ public class RunJets : MonoBehaviour
81
  for (int i = 0; i < words.Length; i++)
82
  {
83
  string s = words[i];
84
- string[] parts = s.Split(' ', System.StringSplitOptions.RemoveEmptyEntries);
85
- if (parts[0] != ";;;")
86
  {
87
  string key = parts[0];
88
  dict.Add(key, s.Substring(key.Length + 2));
@@ -94,6 +94,7 @@ public class RunJets : MonoBehaviour
94
  dict.Add("!", "'!'");
95
  dict.Add("?", "'?'");
96
  dict.Add("\"", "''''");
 
97
  }
98
 
99
  public string ExpandNumbers(string text)
@@ -126,7 +127,7 @@ public class RunJets : MonoBehaviour
126
 
127
  //Decode the word into phenomes by looking for the longest word in the dictionary that matches
128
  //the first part of the word and so on.
129
- //This is works fairly well but could be improved. The original paper had a model that
130
  //dealt with guessing the phonemes of words
131
  public string DecodeWord(string word)
132
  {
 
81
  for (int i = 0; i < words.Length; i++)
82
  {
83
  string s = words[i];
84
+ string[] parts = s.Split();
85
+ if (parts[0] != ";;;") //ignore comments in file
86
  {
87
  string key = parts[0];
88
  dict.Add(key, s.Substring(key.Length + 2));
 
94
  dict.Add("!", "'!'");
95
  dict.Add("?", "'?'");
96
  dict.Add("\"", "''''");
97
+ // You could add extra word pronounciations here
98
  }
99
 
100
  public string ExpandNumbers(string text)
 
127
 
128
  //Decode the word into phenomes by looking for the longest word in the dictionary that matches
129
  //the first part of the word and so on.
130
+ //This works fairly well but could be improved. The original paper had a model that
131
  //dealt with guessing the phonemes of words
132
  public string DecodeWord(string word)
133
  {