MATLAB: How can I play an audio, and in the middle of it, play a voice. but when the voice is played, the audio sounds 50% more slowly

audioenginermp3playsoundwav

Help!

Best Answer

vstart_at = 5000;
vlength = size(Voice,1);
slow_len = ceil(vlength/2);
p1 = x(1:vstart_at-1,:);
p2a = kron(x(vstart_at:vstart_at+slow_len,:), ones(2,1));
p2b = Voice;
if vlength ~= 2*slow_len
p2b(end+1,:) = 0;
end
p3 = x(vstart_at+slow_len+1:end,:);
new_x = [p1;
p2a + p2b;
p3];