Ok, by not releasing the textToSpeech object, the seg fault went away.  Now
it makes sound, however, it only makes a chirp, a very small piece of the
overall sound.  I think I still must be missing something.

Thank you,
John Delaney

On Tue, Nov 3, 2009 at 4:25 PM, John Delaney <[email protected]> wrote:

> Thank you Marcelo,
>
> Wow the screen output is really cool!  But I'm still not getting sound, and
> still getting a seg fault at the end.  Is there a sound setting I'm missing?
>
> Here is the output at the end:
> 2009-11-03 16:21:11.555 tst_obc[1667:10b]     Posture  0  tempo: 0.912,
> syllable: 0, onset:    0.00, ruleTempo: 1.000, #                  # Rule 30,
> duration:  163.63, beat:  113.54
> 2009-11-03 16:21:11.556 tst_obc[1667:10b]     Posture  1  tempo: 0.912,
> syllable: 0, onset:  113.54, ruleTempo: 1.000, h
> 2009-11-03 16:21:11.556 tst_obc[1667:10b]     Posture  2  tempo: 0.912,
> syllable: 1, onset:  113.54, ruleTempo: 1.000, e                  # Rule 42,
> duration:   86.69, beat:  180.34
> 2009-11-03 16:21:11.557 tst_obc[1667:10b]   Foot 1  tempo: 0.912, marked:
> 0, last: 0, onset1: 0.000, onset2: 0.000
> 2009-11-03 16:21:11.557 tst_obc[1667:10b]     Posture  3  tempo: 0.912,
> syllable: 0, onset:  180.34, ruleTempo: 1.000, l                  # Rule 42,
> duration:   78.47, beat:  264.69
> 2009-11-03 16:21:11.558 tst_obc[1667:10b]     Posture  4  tempo: 0.912,
> syllable: 0, onset:  264.69, ruleTempo: 1.000, uh                 # Rule 32,
> duration:   87.13, beat:  338.40
> 2009-11-03 16:21:11.558 tst_obc[1667:10b]     Posture  5  tempo: 0.912,
> syllable: 0, onset:  338.40, ruleTempo: 1.000, uu                 # Rule 42,
> duration:   96.18, beat:  433.24
> 2009-11-03 16:21:11.559 tst_obc[1667:10b]   Foot 2  tempo: 0.942, marked:
> 0, last: 0, onset1: 0.000, onset2: 0.000
> 2009-11-03 16:21:11.559 tst_obc[1667:10b]     Posture  6  tempo: 0.942,
> syllable: 0, onset:  433.24, ruleTempo: 1.000, w                  # Rule 42,
> duration:  108.69, beat:  531.74
> 2009-11-03 16:21:11.560 tst_obc[1667:10b]     Posture  7  tempo: 0.942,
> syllable: 0, onset:  531.74, ruleTempo: 1.000, er                 # Rule 42,
> duration:  104.97, beat:  638.99
> 2009-11-03 16:21:11.561 tst_obc[1667:10b]     Posture  8  tempo: 0.942,
> syllable: 0, onset:  638.99, ruleTempo: 1.000, r                  # Rule 42,
> duration:   86.40, beat:  739.28
> 2009-11-03 16:21:11.561 tst_obc[1667:10b]     Posture  9  tempo: 0.942,
> syllable: 0, onset:  739.28, ruleTempo: 1.000, ll                 # Rule 47,
> duration:   89.26, beat:  846.21
> 2009-11-03 16:21:11.561 tst_obc[1667:10b]     Posture 10  tempo: 0.942,
> syllable: 0, onset:  846.21, ruleTempo: 1.000, d                  # Rule 21,
> duration:  170.45, beat: 1016.62
> 2009-11-03 16:21:11.562 tst_obc[1667:10b]   Foot 3  tempo: 0.991, marked:
> 1, last: 1, onset1: 0.000, onset2: 0.000
> 2009-11-03 16:21:11.562 tst_obc[1667:10b]     Posture 11  tempo: 0.991,
> syllable: 0, onset: 1016.62, ruleTempo: 1.000, t'
> 2009-11-03 16:21:11.563 tst_obc[1667:10b]     Posture 12  tempo: 0.991,
> syllable: 0, onset: 1016.62, ruleTempo: 1.000, e'                 # Rule 24,
> duration:  227.35, beat: 1207.80
> 2009-11-03 16:21:11.563 tst_obc[1667:10b]     Posture 13  tempo: 0.991,
> syllable: 0, onset: 1207.80, ruleTempo: 1.000, k'
> 2009-11-03 16:21:11.564 tst_obc[1667:10b]     Posture 14  tempo: 0.991,
> syllable: 0, onset: 1207.80, ruleTempo: 1.000, s'                 # Rule 18,
> duration:  202.33, beat: 1445.70
> 2009-11-03 16:21:11.564 tst_obc[1667:10b]     Posture 15  tempo: 0.991,
> syllable: 0, onset: 1445.70, ruleTempo: 1.000, t'
> 2009-11-03 16:21:11.565 tst_obc[1667:10b]     Posture 16  tempo: 0.991,
> syllable: 0, onset: 1445.70, ruleTempo: 1.000, #'
> 2009-11-03 16:21:11.565 tst_obc[1667:10b] <  printDataStructures:
> 2009-11-03 16:21:11.566 tst_obc[1667:10b] sample rate: 22050.000000
> 2009-11-03 16:21:11.567 tst_obc[1667:10b] format id: 6c70636d (lpcm)
> 2009-11-03 16:21:11.567 tst_obc[1667:10b] format flags: 1c
> 2009-11-03 16:21:11.568 tst_obc[1667:10b] bytes per packet: 2
> 2009-11-03 16:21:11.569 tst_obc[1667:10b] frames per packet: 1
> 2009-11-03 16:21:11.569 tst_obc[1667:10b] bytes per frame: 2
> 2009-11-03 16:21:11.570 tst_obc[1667:10b] channels per frame: 1
> 2009-11-03 16:21:11.570 tst_obc[1667:10b] bits per channel: 16
> initializeConversion(), sampleRateConverter.maximumSampleValue: 0
> 2009-11-03 16:21:11.645 tst_obc[1667:10b] number of samples:    32928
> 2009-11-03 16:21:11.646 tst_obc[1667:10b] maximum sample value:    0.0011
> 2009-11-03 16:21:11.646 tst_obc[1667:10b] scale:            29971423.7842
> 2009-11-03 16:21:11.652 tst_obc[1667:10b] dealloc, free(inputData)
> Segmentation fault
> logout
>
> Thank you,
> John Delaney
>
>
> On Tue, Nov 3, 2009 at 4:13 PM, Marcelo Yassunori Matuda <
> [email protected]> wrote:
>
>> Hi John,
>>
>> On Tue, Nov 3, 2009 at 9:38 PM, John Delaney <[email protected]>
>> wrote:
>> > Because I am a bit of a beginner, please let me know if because of my
>> level
>> > of experience this email is inappropriate.
>>
>> I am a newbie in ObjC too.
>>
>> > Here is my very naive implementation:
>> > #import "TextToSpeech.h"
>> >
>> > int main (int argc, const char * argv[]) {
>> >     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
>> >
>> >     // insert code here...
>> >     NSLog(@"Hello, World!");
>> >
>> >     TextToSpeech * textToSpeech;
>> >     NSLog(@"0");
>> >     [textToSpeech init];
>> >
>> >     NSString * stext = @"hello world text";
>> >
>> >
>> >     [textToSpeech speakText:stext];
>> >
>> >
>> >     [textToSpeech dealloc];
>> >     //[phoneString dealloc];
>> >
>> >     [pool drain];
>> >     return 0;
>> > }
>>
>> You need to allocate the memory first:
>>
>> TextToSpeech *textToSpeech = [[TextToSpeech alloc] init];
>>
>> And AFAIK you should use:
>>
>> [textToSpeech release];
>>
>> not dealloc.
>>
>> Regards,
>> Marcelo
>>
>
>
_______________________________________________
gnuspeech-contact mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnuspeech-contact

Reply via email to