Speaker bigMan - Performance

Phil Weichert weichert at hal-pc.org
Sat Aug 18 20:20:45 UTC 2001


Performance enhancements ideas requested.

I have been look into the Voice synthesis stuff.  In going through the
examples in the image such as Speaker bigMan say: 'You can cheat, but
don''t get caught.'
I noticed that the speech pattern is slow like a 45rpm record played at
33 1/3.  I tried several other examples and they all do the same.  I
would hope that a 500 mhz PC should handle this but apparently not.  I
evaluated the following:
TimeProfileBrowser onBlock: [Speaker bigMan say: 'You can cheat, but
don''t get caught.']

In the leaves section, a tremendous amount of time is lots in "hash" and
process resume. I am rusty on hash.  Any practical suggestions on
improving the performance of hash or any of the other parts.  I would
like to heard bigMan Speaker speak at a normal tempo.


' - 58 tallies, 1031 msec.

**Tree**
69.0% {711ms} Speaker>>say:
  |60.3% {622ms} CompositeEvent(VoiceEvent)>>playOn:delayed:
  |  |60.3% {622ms} CompositeEvent>>playOn:at:
  |  |  56.9% {587ms} PhoneticEvent>>playOn:at:
  |  |    |56.9% {587ms} KlattVoice>>playPhoneticEvent:at:
  |  |    |  56.9% {587ms} KlattVoice>>playEvent:segments:boundary:at:
  |  |    |    36.2% {373ms} KlattVoice>>playEvent:frames:at:
  |  |    |      |15.5% {160ms} KlattSynthesizer>>samplesFromFrames:
  |  |    |      |  |8.6% {89ms} primitives
  |  |    |      |  |6.9% {71ms} OrderedCollection>>do:
  |  |    |      |10.3% {106ms} KlattVoice(Voice)>>playBuffer:at:
  |  |    |      |  |10.3% {106ms} QueueSound(AbstractSound)>>play
  |  |    |      |  |  10.3% {106ms} SoundPlayer class>>playSound:
  |  |    |      |  |    10.3% {106ms} SoundPlayer class>>resumePlaying:

  |  |    |      |  |      10.3% {106ms} SoundPlayer
class>>resumePlaying:quickStart:
  |  |    |      |  |        10.3% {106ms} SoundPlayer
class>>startUpWithSound:
  |  |    |      |  |          10.3% {106ms} SoundPlayer
class>>startPlayerProcessBu...e:rate:stereo:sound:
  |  |    |      |  |            10.3% {106ms} Process>>resume
  |  |    |      |3.4% {35ms} KlattVoice>>dBFromLinear:
  |  |    |      |3.4% {35ms} KlattVoice>>linearFromdB:
  |  |    |      |  3.4% {35ms} SmallInteger(Number)>>raisedTo:
  |  |    |    20.7% {213ms} KlattVoice>>currentFramesCount:
  |  |    |      20.7% {213ms} KlattSegment>>left:right:speed:pattern:
  |  |    |        15.5% {160ms} KlattSegment>>slopeWith:selector:speed:

  |  |    |          13.8% {142ms} Dictionary>>at:
  |  |    |            13.8% {142ms} Dictionary>>at:ifAbsent:
  |  |    |              12.1% {125ms}
Dictionary(Set)>>findElementOrNil:
  |  |    |                12.1% {125ms} Dictionary>>scanFor:
  |  |    |                  8.6% {89ms}
Symbol(SequenceableCollection)>>hash
  |  |    |                    6.9% {71ms} primitives
  |  |  3.4% {35ms} KlattVoice>>flush
  |  |    3.4% {35ms} KlattVoice>>playEvent:segments:boundary:at:
  |  |      3.4% {35ms} KlattVoice>>currentFramesCount:
  |  |        3.4% {35ms} KlattSegment>>left:right:speed:pattern:
  |8.6% {89ms} Speaker>>eventsFromString:
  |  5.2% {54ms} Clause>>accept:
  |    |3.4% {35ms} F0RenderingVisitor>>clause:
  |  3.4% {35ms} Speaker>>clauseFromString:
  |    3.4% {35ms} Speaker>>phraseFromString:
  |      3.4% {35ms} Speaker>>wordFromString:
  |        3.4% {35ms} PhoneticTranscriber>>transcriptionOf:
  |          3.4% {35ms} PhoneticRule>>matches:at:
31.0% {320ms} Speaker class>>bigMan
  22.4% {231ms} KlattVoice class(Voice class)>>new
    |22.4% {231ms} KlattVoice>>initialize
    |  22.4% {231ms} KlattSegmentSet class>>arpabet
    |    22.4% {231ms} KlattSegmentSet>>initializeArpabet
  8.6% {89ms} Speaker class>>new
    8.6% {89ms} Speaker>>initialize
      6.9% {71ms} PhoneticTranscriber class>>default
        6.9% {71ms} PhoneticTranscriber class>>english
          6.9% {71ms} PhoneticRule class>>english

**Leaves**
10.3% {106ms} String(SequenceableCollection)>>hash
10.3% {106ms} Process>>resume
8.6% {89ms} SmallInteger>>hashMultiply
8.6% {89ms} KlattSynthesizer>>samplesFromFrames:
6.9% {71ms} Dictionary>>scanFor:
6.9% {71ms} OrderedCollection>>do:
3.4% {35ms} KlattVoice>>dBFromLinear:
3.4% {35ms} Symbol>>=
3.4% {35ms} KlattSegmentParameter>>fixed:
3.4% {35ms} String class(Object)>>hash
'


Thanks,
Phil





More information about the Squeak-dev mailing list