コード例 #1
0
 public virtual void Post(WaveStream stream, SpeechContexts contexts, SpeechVerifier.PostCallback callback)
 {
     if (IsSessionOpen)
     {
         if (Append(stream, contexts))
         {
             Post(callback);
         }
     }
 }
コード例 #2
0
 public virtual void PostStereo(WaveStream stream, SpeechContexts contexts, SpeechAudioChannel channel, SpeechVerifier.PostCallback callback)
 {
     if (IsSessionOpen)
     {
         if (AppendStereo(stream, contexts, channel))
         {
             Post(callback);
         }
     }
 }
コード例 #3
0
 public virtual void Post(string filename, SpeechContexts contexts, SpeechVerifier.PostCallback callback)
 {
     if (IsSessionOpen)
     {
         if (Append(filename, contexts))
         {
             Post(callback);
         }
     }
 }
コード例 #4
0
 public virtual SpeechVerifier.Result PostStereo(WaveStream stream, SpeechContexts contexts, SpeechAudioChannel channel)
 {
     if (IsSessionOpen)
     {
         if (AppendStereo(stream, contexts, channel))
         {
             return(Post());
         }
     }
     return(SpeechVerifier.Result.Invalid);
 }
コード例 #5
0
 public virtual SpeechVerifier.Result Post(WaveStream stream, SpeechContexts contexts)
 {
     if (IsSessionOpen)
     {
         if (Append(stream, contexts))
         {
             return(Post());
         }
     }
     return(SpeechVerifier.Result.Invalid);
 }
コード例 #6
0
 public virtual SpeechVerifier.Result Post(string filename, SpeechContexts contexts)
 {
     if (IsSessionOpen)
     {
         if (Append(filename, contexts))
         {
             return(Post());
         }
     }
     return(SpeechVerifier.Result.Invalid);
 }
コード例 #7
0
 public virtual bool AppendStereo(WaveStream stream, SpeechContexts contexts, SpeechAudioChannel channel)
 {
     if (IsSessionOpen)
     {
         if (AppendStereo(stream, channel))
         {
             return(AppendContexts(contexts));
         }
     }
     return(false);
 }
コード例 #8
0
 public bool Append(WaveStream stream, SpeechContexts contexts)
 {
     if (IsSessionOpen)
     {
         if (Append(stream))
         {
             return(AppendContexts(contexts));
         }
     }
     return(false);
 }
コード例 #9
0
 public virtual Task <SpeechVerifier.Result> PostAsync(string filename, SpeechContexts contexts)
 {
     if (IsSessionOpen)
     {
         if (Append(filename, contexts))
         {
             return(PostAsync());
         }
     }
     return(Task.FromResult(SpeechVerifier.Result.Invalid));
 }
コード例 #10
0
        public SpeechContexts Clone()
        {
            SpeechContexts contexts = new SpeechContexts(Count);

            foreach (var context in this)
            {
                contexts.Add(context.Clone());
            }

            return(contexts);
        }
コード例 #11
0
 public virtual Task <SpeechVerifier.Result> PostStereoAsync(string filename, SpeechContexts contexts, SpeechAudioChannel channel)
 {
     if (IsSessionOpen)
     {
         if (AppendStereo(filename, contexts, channel))
         {
             return(PostAsync());
         }
     }
     return(Task.FromResult(SpeechVerifier.Result.Invalid));
 }
コード例 #12
0
 public virtual Task <SpeechVerifier.Result> PostAsync(WaveStream stream, SpeechContexts contexts)
 {
     if (IsSessionOpen)
     {
         if (Append(stream, contexts))
         {
             return(PostAsync());
         }
     }
     return(Task.FromResult(SpeechVerifier.Result.Invalid));
 }
コード例 #13
0
 public bool Append(string filename, SpeechContexts contexts)
 {
     if (IsSessionOpen)
     {
         var waveStream = new WaveFileReader(filename);
         if (Append(waveStream))
         {
             return(AppendContexts(contexts));
         }
     }
     return(false);
 }
コード例 #14
0
 public virtual bool AppendStereo(string filename, SpeechContexts contexts, SpeechAudioChannel channel)
 {
     if (IsSessionOpen)
     {
         var waveStream = new WaveFileReader(filename);
         if (AppendStereo(waveStream, channel))
         {
             return(AppendContexts(contexts));
         }
     }
     return(false);
 }
コード例 #15
0
 public virtual bool AppendContexts(SpeechContexts contexts)
 {
     if (IsSessionOpen)
     {
         if (contexts != null)
         {
             IsLivenessRequired = true;
             foreach (var ctx in contexts)
             {
                 Content.Add("speech", ctx);
             }
         }
         return(true);
     }
     return(false);
 }
コード例 #16
0
 public Task <Result> PostAsync(WaveStream stream, SpeechContexts contexts)
 {
     return(mSpeechVerifier.PostAsync(stream, contexts));
 }
コード例 #17
0
 public Task <Result> PostAsync(string filename, SpeechContexts contexts)
 {
     return(mSpeechVerifier.PostAsync(filename, contexts));
 }
コード例 #18
0
 public void Post(WaveStream stream, SpeechContexts contexts, PostCallback callback)
 {
     mSpeechVerifier.Post(stream, contexts, callback);
 }
コード例 #19
0
 public void Post(string filename, SpeechContexts contexts, PostCallback callback)
 {
     mSpeechVerifier.Post(filename, contexts, callback);
 }
コード例 #20
0
 public Result Post(WaveStream stream, SpeechContexts contexts)
 {
     return(mSpeechVerifier.Post(stream, contexts));
 }
コード例 #21
0
 public Result Post(string filename, SpeechContexts contexts)
 {
     return(mSpeechVerifier.Post(filename, contexts));
 }
コード例 #22
0
 public bool AppendStereo(WaveStream stream, SpeechContexts contexts, SpeechAudioChannel channel)
 {
     return(mSpeechVerifier.AppendStereo(stream, contexts, channel));
 }
コード例 #23
0
 public bool AppendStereo(string filename, SpeechContexts contexts, SpeechAudioChannel channel)
 {
     return(mSpeechVerifier.AppendStereo(filename, contexts, channel));
 }
コード例 #24
0
 public bool Append(WaveStream stream, SpeechContexts contexts)
 {
     return(mSpeechVerifier.Append(stream, contexts));
 }
コード例 #25
0
 public bool Append(string filename, SpeechContexts contexts)
 {
     return(mSpeechVerifier.Append(filename, contexts));
 }