SP03 Text to Speech Synthesizer
SP03.h
- Committer:
- yangcq88517
- Date:
- 2014-05-07
- Revision:
- 0:2326b6172834
- Child:
- 1:58ab657cd515
File content as of revision 0:2326b6172834:
#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