AudioReplace

AudioReplace[audio,{t1,t2}new]

replaces the audio signal between t1 and t2 with the new signal new.

AudioReplace[audio,{{t11,t12},}new]

replaces multiple intervals with the same audio new.

AudioReplace[audio,{{t11,t12}new1,}]

replaces multiple intervals.

AudioReplace[audio,{t1,t2}new,fitting]

uses the specified fitting method.

Details

  • AudioReplace can be used to replace a part of an audio signal with a new signal. Typically, the duration of the whole audio stays unchanged.
  • The time t can be any of the following:
  • ttime given in seconds
    Quantity[t,"unit"]time given in "unit" compatible with seconds
    Quantity[t,"Samples"]time given as number of samples
  • The fitting method specifies how new replaces the {t1,t2} interval. Possible settings are:
  • "Fill"pad or trim new to duration t2-t1 (default)
    "Insert"remove audio from t1 to t2 and insert new at t1
    "Stretch"replace {t1,t2} with the time-stretched version of new

Examples

open allclose all

Basic Examples  (1)

Replace the interval between .5 and 1 seconds with a sinusoid:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Scope  (3)

Applications  (3)

See Also

AudioInsert  AudioTrim  AudioDelete  AudioIntervals  AudioJoin

Introduced in 2017
(11.1)