SP03 Text to Speech Synthesizer
Diff: SP03.h
- Revision:
- 0:2326b6172834
- Child:
- 1:58ab657cd515
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SP03.h Wed May 07 13:52:08 2014 +0000 @@ -0,0 +1,33 @@ +#ifndef Smartlab_Drive_SP03 +#define Smartlab_Drive_SP03 + +#include "SP03SpeechSetting.h" +#include "mbed.h" + +class SP03 +{ +private: + static const uint8_t DEFAULT_ADDRESS = 0xC4; + static const int CLOCK_RATE = 100000; + static const uint8_t REGISTER_FOR_COMMAND = 0x00; + static const uint8_t REGISTER_FOR_SOFTWARE_REVISION_NUMBER = 0x01; + static const uint8_t SPEAK_OUT_THE_BUFFER = 0x40; + static const uint8_t DEFAULT_SPEECH_PITCH = 0x03; + + I2C i2c_bus; + + void _speak(const char message[],SmartLab_SP03::Speech_Speed speed, SmartLab_SP03::Speech_Volume volume,uint8_t pitch); +public : + + SP03(PinName sda, PinName scl); + + void Speak(const char message[]); + + void Speak(const char message[],SmartLab_SP03::Speech_Speed speed, SmartLab_SP03::Speech_Volume volume); + + void Speak(const char message[],SmartLab_SP03::Speech_Speed speed, SmartLab_SP03::Speech_Volume volume,uint8_t pitch); + + bool IsSpeaking(); +}; + +#endif \ No newline at end of file