Пример #1
0
 public UOtoSet(OtoSet otoSet, USinger singer, string singersPath)
 {
     this.otoSet = otoSet;
     Location    = Path.Combine(singersPath, Path.GetDirectoryName(otoSet.File));
     Otos        = new Dictionary <string, List <UOto> >();
     foreach (var oto in otoSet.Otos)
     {
         if (!Otos.ContainsKey(oto.Alias))
         {
             Otos.Add(oto.Alias, new List <UOto>());
         }
         Otos[oto.Alias].Add(new UOto(oto, this));
     }
     Errors = otoSet.Errors;
 }
Пример #2
0
 public UOtoSet(OtoSet otoSet, USinger singer, string singersPath)
 {
     Name     = otoSet.Name;
     Location = Path.Combine(singersPath, Path.GetDirectoryName(otoSet.File));
     Otos     = new Dictionary <string, UOto>();
     foreach (var oto in otoSet.Otos)
     {
         if (!Otos.ContainsKey(oto.Name))
         {
             Otos.Add(oto.Name, new UOto(oto, this));
         }
         else
         {
             Serilog.Log.Error("{0} {1} {2}", singer.Name, Name, oto.Name);
         }
     }
 }
Пример #3
0
        USinger GetDummySinger()
        {
            var voicebank = new Voicebank {
                File = "null",
                Name = "Dummy",
            };
            var otoSet = new OtoSet {
                File = "null",
                Name = "",
            };

            otoSet.Otos.Add(new Oto {
                Alias = "a",
                Wav   = "a.wav",
            });
            voicebank.OtoSets.Add(otoSet);
            return(new USinger(voicebank, "null"));
        }