0
0

Hello,

I’m attempting to program a simple speech synthesizer (for use with a talking head), which is currently required to speak a pre-set sentence, but allowing for tempo changes (while keeping the same pitch).

I have my own code for creating synthesized waveforms, and therefore simply require FMOD to handle the playing of the waveforms.

I’m looking for suggestions for the best way to implement this:

    1) Should I use subsounds so that I can interchange the different tempo waveforms?

   2)  Will I need to use pcmreadcallback to load the synthesized sound from my array (currently a float array holding the samples of the wav)?

   3) Will I need to use pcmsetposcallback to position the next sound at the correct position, or are the preset functions satisfactory?

I’ve done a lot of reading of the forum and I am just looking for some clarification that my ideas above are not crazy!

Many thanks in advance,

Chris.

  • You must to post comments
0
0

Hi Chris, welcome to the FMOD forums.

[quote:36y7drbu]I have my own code for creating synthesized waveforms, and therefore simply require FMOD to handle the playing of the waveforms. [/quote:36y7drbu]
How big are these synthesized waveforms, are they sentences, words or syllables? If it is whole sentences and all you need to do is play the sound then that would be simple in FMOD. If you want sample accurate stitching then you will have to do a few things.

[quote:36y7drbu]1) Should I use subsounds so that I can interchange the different tempo waveforms? [/quote:36y7drbu]
I assume you’re talking about subsound sentences. If you want to stitch sounds together in a sentence and play that sentence from start to finish then subsound sentences should do the job.

[quote:36y7drbu]2) Will I need to use pcmreadcallback to load the synthesized sound from my array (currently a float array holding the samples of the wav)? [/quote:36y7drbu]
Yes, that will work.

[quote:36y7drbu]3) Will I need to use pcmsetposcallback to position the next sound at the correct position, or are the preset functions satisfactory? [/quote:36y7drbu]
The pcmsetposcallback is for seeking within a single sound. Even if you don’t expect FMOD to seek, you should probably implement this just to be safe.

  • You must to post comments
0
0

Peter,

Thanks for your reply. The waveforms that I synthesize are whole sentances. I think the key point is that I want to interchange whole sentance waveforms when the user changes the tempo.

e.g. the sentance is currently playing at 1.5 seconds into the waveform when the user wants to slow down the speed (and keep pitch).

 At this point I want to swap the currently playing waveform for the synthesized waveform (whole sentance) of correct tempo/duration - so I'm looking to start the new waveform at the same time that the previous waveform was stopped.

What’s the best way to do this?

Thanks for your time and thoughts,

Chris.

  • You must to post comments
0
0

[quote:2672ck6s]At this point I want to swap the currently playing waveform for the synthesized waveform (whole sentance) of correct tempo/duration – so I’m looking to start the new waveform at the same time that the previous waveform was stopped.

What’s the best way to do this? [/quote:2672ck6s]
I think the best way would be to create one custom sound using pcmreadcallback. Then you can put all the logic of changing tempos inside your code and use that callback to keep feeding FMOD data.

FYI If all you need is pitch invariant speed changes, you can use the FMOD pitchshifter effect to compensate any change in pitch caused by setFrequency.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.