Wrapper of NSSpeechSynthesizer for OSX
Objective-C C++
Latest commit 5a2c185 Aug 30, 2013 @2bbb maybe fixed crush.
Permalink
Failed to load latest commit information.
example rename .cpp to .mm, add main.mm, and, fix documentation Aug 11, 2013
src maybe fixed crush. Aug 30, 2013
.gitignore initial Jul 17, 2013
README.md add comment Aug 11, 2013

README.md

ofxVoiceSynthesizer (OSX)

How to use

  1. Add AppKit.framework to your project
  2. Add ofxVoiceSynthesizer & ofxObjective-C++Utility to your project and include ofxVoiceSynthesizer.h
  3. 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

Dependencies

ofxObjective-C++Utility [https://github.com/2bbb/ofxObjective-C--Utility]

API

ofxVoiceSynthesizer

  • 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.

Update history

2013/07/18 ver 0.01 beta release

  • Let's speak!!

License

MIT License.

Author

  • ISHII 2bit [bufferRenaiss co., ltd.]
  • ishii[at]buffer-renaiss.com

At the last

Please create new issue, if there is a problem. And please throw pull request, if you have a cool idea!!