Boosting flite gain

Home Forums OpenEars Boosting flite gain

Viewing 4 posts - 1 through 4 (of 4 total)

  • Author
    Posts
  • #1015995
    ransomweaver
    Participant

    Hi,

    I’m using flitecontroller to generate wav files; I’ve modified the openears framework accordingly, saving the file instead of sending it to the AVSoundPlayer to speak. I play the wavs with an existing (cocos2d-based) sound engine.

    However I would like to increase the volume of the flite output. Relative to music at the same volume setting, its very hard to hear.

    I found the flit->gain in rate_conv.c, set to 0.8. I’ve tried setting this as high as 20 but I think it only goes up to 1.0. In any event, its still too low for me.

    The app I’m using this in previously used speech files generated on a server using Festival, and to make those loud enough I had passed a -scale parameter of 2 to the text2wave program. I don’t really see any corresponding volume scaling feature in flite.

    Any thoughts?

    #1015996
    Halle Winkler
    Politepix

    Welcome,

    I think in this case I’d just write a little gain-increasing method to loop through buffers of the returned TTS speech right before they are added to the virtual WAV file in FliteController and boost them. I like this StackOverflow thread for a good starting point:

    http://stackoverflow.com/questions/3982723/audio-processing-playing-with-volume-level

    #1016002
    ransomweaver
    Participant

    Thanks!

    That SO question has the goods. I’m not much for C programming, but I know how to use a C function in an Obj C class, so I used the ScaleAudioFileAmplitude function shown there.

    This probably is a bit wasteful, as my modified flitecontroller writes the data to file then reads/writes it again with the amplification, but it works very well. And quicker than me figuring out how to iterate through the data part of the buffer in memory.

    #1016004
    Halle Winkler
    Politepix

    I think that’s a sensible solution. There are a lot of places in buffer operations to make little mistakes that can waste a day or more.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.