From 7b0fe0de9c629e864325deb5fa6eb024931b7364 Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Fri, 24 Jan 2014 20:09:04 +0800 Subject: [PATCH 1/5] Added Comments for Syllable class --- uspeech.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/uspeech.h b/uspeech.h index aa39e9f..aa5e782 100755 --- a/uspeech.h +++ b/uspeech.h @@ -20,6 +20,9 @@ #define F_DETECTION 3 #define F_CONSTANT 350 +/** + * The main recognizer class + */ class signal{ public: int arr[32]; /*!< This is the audio buffer*/ @@ -35,7 +38,7 @@ class signal{ int amplificationFactor; /*! 0 - void debugPrint(); + int f,e,o,s,h,v; /*!< Accumulators for the stated characters */ + syllable(); /*!< Constructor for the class*/ + void classify(char c); /*!< Classifies the character into a vector so as to create a fingerprint for the uttered syllable*/ + int* tointptr(); /*!< Returns the vector from the accumulators as an integer pointer */ + #if ARDUINO_ENVIRONMENT > 0 + void debugPrint(); /*!< Outputs the datain the accumulator vector. Only enabled for arduino.*/ #endif - }; #endif From ce0f508f5afc5ced3b6423558ca60fcb436e5d19 Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Sun, 9 Feb 2014 15:23:21 +0800 Subject: [PATCH 2/5] Added reset() and docs. --- uspeech.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uspeech.h b/uspeech.h index aa5e782..abd4da7 100755 --- a/uspeech.h +++ b/uspeech.h @@ -64,7 +64,8 @@ class syllable{ public: int f,e,o,s,h,v; /*!< Accumulators for the stated characters */ syllable(); /*!< Constructor for the class*/ - void classify(char c); /*!< Classifies the character into a vector so as to create a fingerprint for the uttered syllable*/ + void reset(); /*!< Resets the accumulator so a new syllable can be formed. Call this when you detect silence*/ + void classify(char c); int* tointptr(); /*!< Returns the vector from the accumulators as an integer pointer */ #if ARDUINO_ENVIRONMENT > 0 void debugPrint(); /*!< Outputs the datain the accumulator vector. Only enabled for arduino.*/ From 5da07039e30df3d88fce83dc1040b7f09915f348 Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Sun, 9 Feb 2014 15:24:34 +0800 Subject: [PATCH 3/5] Added support for reset, fixes enhancement #21. --- vocab.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vocab.cpp b/vocab.cpp index 6930188..dfc6506 100755 --- a/vocab.cpp +++ b/vocab.cpp @@ -3,6 +3,9 @@ syllable::syllable(){ f = 0; e = 0; o = 0; s = 0; h = 0; v = 0; } +void syllable::reset(){ + f = 0; e = 0; o = 0; s = 0; h = 0; v = 0; +} /*** * Classify a character into f,e,o,s,h; Call during main loop * @param c the phoneme @@ -61,4 +64,4 @@ int* syllable::tointptr(){ matrix[4] = h; matrix[5] = s; return matrix; -} \ No newline at end of file +} From 38a7b06aa1a39bdeb04b6d57981136e75631b956 Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Sun, 9 Feb 2014 15:27:09 +0800 Subject: [PATCH 4/5] I think it is 2014 currently. --- LICENSE.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index d074cf1..6a0d9bb 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,7 +1,7 @@ -Copyright (C) 2012-2013 Arjo Chakravarty +Copyright (C) 2012-2014 Arjo Chakravarty Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 427ae8b6cb8d6e772c5f0035507f6aaea02857ce Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Sun, 16 Feb 2014 20:48:59 +0800 Subject: [PATCH 5/5] Added todo comment --- uspeech.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uspeech.h b/uspeech.h index abd4da7..1b17b93 100755 --- a/uspeech.h +++ b/uspeech.h @@ -1,6 +1,6 @@ /* uspeech v.4.x.x - 2012 Arjo Chakravarty + 2012-2014 Arjo Chakravarty uspeech is a library that allows sounds to be classified into certain phonemes on the Arduino. This creates a simple beginning for a full scale voice recognition @@ -71,5 +71,5 @@ class syllable{ void debugPrint(); /*!< Outputs the datain the accumulator vector. Only enabled for arduino.*/ #endif }; - +//TODO: implement statistics classes. #endif