fim32

Forum Replies Created

Viewing 1 post (of 1 total)

  • Author
    Posts
  • in reply to: rubymotion #1016923
    fim32
    Participant

    In case anyone else is trying to do this, I got it to work!

    First, the libs need the VoiceData files NOT in nested structure, I copied all the individual files into the Resources folder.  When the app builds, those files will all end up in the root of the app.  As a side, it makes the directory structure in the app kind of ugly, but anyways.

    Secondly, probably due to the way rubymotion tries to figure out what to import, I couldn’t use the 2 frameworks separately.  Also, the number of header files made gen_bridge_metadata (the utiltiy for osx to figure out what’s in a framework) choke.

    So, I reformed the framework, with just the 2 libraries (OpenEars, NeatSpeech), all the Header files from NeatSpeech (only 2) and whatever Headers I thought were important from OpenEars.  Obviously, I guessed the latter, but since I only want playback I picked: FliteController.h and FliteVoice.h.

    Then, in the Rakefile:

    app.vendor_project(‘vendor/OpenEars/OpenEarsNeatSpeech.framework’, :static, :products => [‘OpenEars’, ‘NeatSpeechDemo’], :headers_dir => ‘Headers’)

    From there, it’s more simple.  The voice you want to add gets added as another separate framework:

    app.vendor_project(‘vendor/OpenEars/Voices/Demo/Emma.framework’, :static, :products => [‘Emma’], :headers_dir => ‘Headers’)

    And, then, the calls for the framework look more like Ruby:

    @fc = FliteController.alloc.init

    @voice = Emma.alloc.initWithPitch(0.0, speed:0.0, transform:0.0)

     

    @fc.sayWithNeatSpeech(“I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone.”, withVoice:@voice)

    Now, to see if it will fit my needs!

Viewing 1 post (of 1 total)