Wrapper of NSSpeechSynthesizer for OSX
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
src
.gitignore
README.md

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!!