Exemplo n.º 1
0
 public void TestVersion()
 {
     porcupine = Porcupine.FromBuiltInKeywords(ACCESS_KEY, new List <BuiltInKeyword> {
         BuiltInKeyword.PORCUPINE
     });
     Assert.IsFalse(string.IsNullOrWhiteSpace(porcupine.Version), "Porcupine did not return a valid version number.");
     porcupine.Dispose();
 }
Exemplo n.º 2
0
 public void TestFrameLength()
 {
     porcupine = Porcupine.FromBuiltInKeywords(ACCESS_KEY, new List <BuiltInKeyword> {
         BuiltInKeyword.PORCUPINE
     });
     Assert.IsTrue(porcupine.FrameLength > 0, "Specified frame length was not a valid number.");
     porcupine.Dispose();
 }
Exemplo n.º 3
0
 public void TestSingleKeyword()
 {
     porcupine = Porcupine.FromBuiltInKeywords(ACCESS_KEY, new List <BuiltInKeyword> {
         BuiltInKeyword.PORCUPINE
     });
     RunTestCase(
         "porcupine.wav",
         new List <int>()
     {
         0
     });
 }
Exemplo n.º 4
0
        public void TestMultipleKeyword()
        {
            List <BuiltInKeyword> inputKeywords = new List <BuiltInKeyword>
            {
                BuiltInKeyword.ALEXA,
                BuiltInKeyword.AMERICANO,
                BuiltInKeyword.BLUEBERRY,
                BuiltInKeyword.BUMBLEBEE,
                BuiltInKeyword.GRAPEFRUIT,
                BuiltInKeyword.GRASSHOPPER,
                BuiltInKeyword.PICOVOICE,
                BuiltInKeyword.PORCUPINE,
                BuiltInKeyword.TERMINATOR
            };

            porcupine = Porcupine.FromBuiltInKeywords(ACCESS_KEY, inputKeywords);
            RunTestCase(
                "multiple_keywords.wav",
                new List <int>()
            {
                7, 0, 1, 2, 3, 4, 5, 6, 7, 8
            });
        }