• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: TextToSpeech - how to extract and display phonemes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TextToSpeech - how to extract and display phonemes?


  • Subject: Re: TextToSpeech - how to extract and display phonemes?
  • From: "Scotty's Lists" <email@hidden>
  • Date: Sat, 17 Mar 2007 08:31:41 -0400

Eugene,

Maybe something like this work?

Given:

NSData * thePhonemeText = [NSData dataWithBytesNoCopy:*thePhonemeHandle length:theNumOfPhonBytes freeWhenDone:false];

NSString *somePhonemes = [[NSString alloc] initWithData:thePhonemeText encoding: NSMacOSRomanStringEncoding];


NSLog(@"I got phonemes!\n%@", somePhonemes];

I'm assuming MacRoman string encoding on the phoneme bytes from this post by one P. Hosey:
<http://boredzo.org/blog/archives/2006-03-24/report-an-apple-bug- friday-13>.


Scotty

On Mar 16, 2007, at 4:17 PM, Yevgeniy Goldberg wrote:

Greetings!
I need to be to break American English words down to individual phonemes and display those phonemes to the user in a text view.
I'm trying to use TextToPhoneme method, but struggling with extracting the correct string value from this method.
Could anyone tell me how to do this correctly?


char * theTextToSpeak = (char *)[[fSpokenTextView string] lossyCString];

OSErr theErr = TextToPhonemes(fCurSpeechChannel, (Ptr) theTextToSpeak, (long)strlen(theTextToSpeak), thePhonemeHandle, (long *)&theNumOfPhonBytes);

NSData * thePhonemeText = [NSData dataWithBytesNoCopy:*thePhonemeHandle length:theNumOfPhonBytes freeWhenDone:false];

The 3 lines above have me end up with an instance of NSData that contains (I think) the phoneme data.
I'm struggling with extracting that data.


-Eugene
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >TextToSpeech - how to extract and display phonemes? (From: Yevgeniy Goldberg <email@hidden>)

  • Prev by Date: image file path
  • Next by Date: Re: image file path
  • Previous by thread: TextToSpeech - how to extract and display phonemes?
  • Next by thread: How to make NSTreeController expand some items
  • Index(es):
    • Date
    • Thread