From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to concatenate two waveform files with smooth transition

hi,

I'm working on speech synthesis.I'm facing problem in conctatenating phoneme .wav files.The end of first wave form is to be concatenated with start of the next waveform with smooth transition.I have applied windowing method for the smooth transition but the no.of samples in output waveform are getting doubled.Is there any solution to modify this and get the result? Any other alternative will also be helpful.

Thanks in advance.

0 Kudos
Message 1 of 6
(3,986 Views)

You provide no data -- no examples of Waveforms, no VIs (not pictures of VIs, but actual VI files) to show what you have tried.  Are you talking about sampling spoken data and "stitching together" successive temporally-adjacent waveforms?  Are you talking about taking isolated waveforms and minimizing the "click" when you juxtapose them?

 

Bob Schor

0 Kudos
Message 2 of 6
(3,961 Views)

Hi...I'm talking about taking two phoneme .wav files and minimizing the "click" ....

here im attaching the VI files 

1)append1 - it shows how the windowing technique is applied to individual waveforms and then appending them

2)play_y_ow - it plays the sound of the above file("append1")

here the problem is ...after windowing the time duration of the individual waveforms is getting doubled.so there is a drag in the sounds while playing the "play_y_ow" file.

waveform files attached are for generating "you" sound and phoneme files related to it are attached("Y.wav","OW.wav)

Download All
0 Kudos
Message 3 of 6
(3,904 Views)

1. Please either learn to create cleaner diagrams or use the Clean Up Diagram tool before posting. The  crooked wires running all over the diagram are very difficult to follow, making the program difficult to understand. Also, it is best to avoid overlapping controls/indicators on the front panel. Not only does it make it difficult to see the data, it can also reduce performance of the code.

2. When you convert the waveforms to arrays, you lose the timing information. This may be part of the problem with the "drag in the sounds." Before writing the combined data to the file use Build Waveform to reconstruct a waveform datatype.

3. Insert into Array is almost never the best choice for array manipulation. A simple Build Array configured to concatenate inputs will do the job.

4. When you open a file, you should also close it.

5. Number of Waveform Samples.vi is not needed for arrays. Use Array Size.

6. Sequence structures are almost never required in LabVIEW code. Use dataflow to assure the order of operations if required.

 

7. The windowing process will not do what you want. The problem is that when you set the y value to bring the two phonemes to the point of partial overlap, the add function can still produce large, rapid changes in the waveform which may sound like clicks.  I am not sure what the fix is for that.

 

Lynn

0 Kudos
Message 4 of 6
(3,873 Views)

@johnsold wrote:

 

7. The windowing process will not do what you want. The problem is that when you set the y value to bring the two phonemes to the point of partial overlap, the add function can still produce large, rapid changes in the waveform which may sound like clicks.  I am not sure what the fix is for that.

 

Lynn


Not being an Engineer nor a Speech expert, it seems to me that putting a low-pass filter on the ends of the phoneme waveforms (or extending them "smoothly") then aligning the "smooth ends" might be something to try.  Surely there is a literature on this, isn't there?

 

Bob Schor

0 Kudos
Message 5 of 6
(3,848 Views)

That is essentially what windowing does.  The issue is that when the two waveforms get close enough to sound like one, the tapered portions are "inside" and the taper has no useful effect.

 

Lynn

0 Kudos
Message 6 of 6
(3,841 Views)