- Add AppKit.framework to your project
- Add ofxVoiceSynthesizer & ofxObjective-C++Utility to your project and include ofxVoiceSynthesizer.h
- Rename all files have extention like .cpp to .mm / Or, open Project Setting -> TARGETS -> Build Phases -> Compile Sources, and add flag "-x objective-c++" for all file of .cpp
ofxObjective-C++Utility [https://github.com/2bbb/ofxObjective-C--Utility]
- static vector getVoices()
return vector of voice names like com.apple.speech.synthesis.voice.kyoko
- static getDefaultVoice()
return voice name of your system default
- void setup(string voiceName, string successMessage, string failureMessage)
successMessage (default "ofxVoiceSysnthesizerSuccess") and failureMessage (default "ofxVoiceSysnthesizerFailure") is post by ofSendMessage when finish speaking with success or failure.
- float getRate()
- void setRate(float rate)
get/set speaking rate.
- float getVolume()
- void setVolume(float volume)
get/set speaking volume.
- void speak(string text)
Start to speak text.
- bool isSpeaking()
return true when speaking
- void stopSpeaking()
Stop speaking.
- Let's speak!!
MIT License.
- ISHII 2bit [bufferRenaiss co., ltd.]
- ishii[at]buffer-renaiss.com
Please create new issue, if there is a problem. And please throw pull request, if you have a cool idea!!