AudioResample

AudioResample[audio,sr]

resamples audio to have the sample rate of sr.

AudioResample[video,sr]

resamples the first audio track in video to have the sample rate of sr.

Details and Options

  • AudioResample can be used to convert between any sampling rates, including the common ones, e.g. telephone, CD and DVD.
  • The sample rate sr can be given as a positive integer, assumed to be in hertz, a quantity, or a Scaled parameter.
  • The following common sampling rates are also supported:
  • "Telephone"8000used for telephone signal
    "CD"44100used in audio CD, MP3, etc.
    "DVD"48000DVD, professional video equipment, etc.
    "DVDAudio"96000DVD-Audio, Blu-ray, etc.
  • AudioResample works with Audio objects of any number of channels.
  • The following options can be given:
  • Antialiasing Truewhether to antialias when downsampling
    Padding 0padding method
    ResamplingAutomaticresampling method
  • For possible settings for Padding, see the reference page for AudioPad.

Examples

open allclose all

Basic Examples  (1)

Resample an audio object:

Scope  (4)

Specify the sample rate using a frequency Quantity:

Specify the sample rate using a Scaled value:

Specify the sample rate using a preset value:

Process the audio track of a video:

Options  (3)

Antialiasing  (1)

When resampling to a lower sample rate, an antialiasing filter is applied by default:

Resampling by a factor of .5 with antialiasing filter:

Use Antialiasing->False:

Padding  (1)

The default padding value is 0:

Specify a different padding:

Reasampling  (1)

By default, "Lanczos" resampling is used:

Use a different resampling scheme:

Applications  (2)

Convert an audio object in CD quality (44.1 KHz) to DVD quality (48 KHz):

Resampling to a lower sample rate reduces the memory used by the audio object:

Wolfram Research (2016), AudioResample, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioResample.html (updated 2024).

Text

Wolfram Research (2016), AudioResample, Wolfram Language function, https://reference.wolfram.com/language/ref/AudioResample.html (updated 2024).

CMS

Wolfram Language. 2016. "AudioResample." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/AudioResample.html.

APA

Wolfram Language. (2016). AudioResample. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AudioResample.html

BibTeX

@misc{reference.wolfram_2024_audioresample, author="Wolfram Research", title="{AudioResample}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/AudioResample.html}", note=[Accessed: 14-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_audioresample, organization={Wolfram Research}, title={AudioResample}, year={2024}, url={https://reference.wolfram.com/language/ref/AudioResample.html}, note=[Accessed: 14-November-2024 ]}