Audio file import

Queue an audio file, inspect its preview, and open the published Dataset. The exercise includes a FLAC sample.

acq.audio · Version 1.0.1

Queue toni.flac and leave Audio stream index blank for the first audio track. In the Dataset audio.source check the two channels, 8000 Hz, and about 0.5 s. The result records the bytes and metadata of the imported audio. To get a sample matrix for computing spectra and measurements, use the Analysis Audio decode module available in your installation.

For toni.pcm choose s16le, 8000 Hz, and 2 channels. A raw file has no header from which these values can be recovered. With the wrong byte order the samples have different amplitudes. With the wrong rate or channel count, the timing or interleaving changes. For container files leave none and the raw values at zero. An explicit track index must exist.

The menu abbreviations distinguish u8 unsigned 8-bit integer, s16 / s24 / s32 signed integers, and f32 / f64 floating point. le and be indicate little and big endian, respectively. Use the combination declared by the instrument. Support for container formats depends on the available inspection, which can use FFmpeg.

due-stream.mka lets you check the index in a container with two audio tracks. With the box left blank you get the 8000 Hz stereo track; with index 1, the 16000 Hz mono track. Check Technical Details / Provenance after the two Imports. In the raw PCM variants tested, all menu encodings used 8000 Hz and two declared channels.

Exercise files

Sources, licenses, and SHA-256

Screenshots

Open a screenshot to view it at full size.

toni.flac added in Acquisition with Dataset ID audio_flac. The row shows the import settings.
toni.flac added in Acquisition with Dataset ID audio_flac. The row shows the import settings.
Pending Preview of toni.flac with FLAC codec, two channels, and 8000 Hz sample rate.
Pending Preview of toni.flac with FLAC codec, two channels, and 8000 Hz sample rate.
After Import, the browser shows Active Dataset: audio_flac. The Metadata tab describes the recorded result.
After Import, the browser shows Active Dataset: audio_flac. The Metadata tab describes the recorded result.
The audio viewer for audio_flac shows the first channel. FLAC keeps the same samples as the WAV exercise, so the two plots match.
The audio viewer for audio_flac shows the first channel. FLAC keeps the same samples as the WAV exercise, so the two plots match.

Controls and settings

Scrollbar

Use the horizontal or vertical scrollbar to reach fields, entries, or text outside the visible area.

Default Dataset ID

Sets a proposed ID for the sources you add with this importer. Check the actual ID in each row before Import. The Dataset browser uses the published ID to find the result.

Default value in the basic configuration audio.source.

Audio stream index (blank = first audio stream)

Leave it blank for the first audio track. Use an explicit index only for an existing stream and check codec, Hz, and channels in Preview.

The field is initially blank.

Raw PCM sample format (.pcm/.raw only)

For a container, use none. For .pcm or .raw specify the sample format, endianness, and depth, and also fill in rate and channels.

Default value in the basic configuration none.

  • none · Uses the container information. For a headerless PCM, declare the sample format.
  • u8 · Reads 8 bits per sample, unsigned integer, no multibyte byte order. Match the sample rate and the number of channels.
  • s16le · Reads 16 bits per sample, signed integer, little endian. Match the sample rate and the number of channels.
  • s16be · Reads 16 bits per sample, signed integer, big endian. Match the sample rate and the number of channels.
  • s24le · Reads 24 bits per sample, signed integer, little endian. Match the sample rate and the number of channels.
  • s24be · Reads 24 bits per sample, signed integer, big endian. Match the sample rate and the number of channels.
  • s32le · Reads 32 bits per sample, signed integer, little endian. Match the sample rate and the number of channels.
  • s32be · Reads 32 bits per sample, signed integer, big endian. Match the sample rate and the number of channels.
  • f32le · Reads 32 bits per sample, floating point, little endian. Match the sample rate and the number of channels.
  • f32be · Reads 32 bits per sample, floating point, big endian. Match the sample rate and the number of channels.
  • f64le · Reads 64 bits per sample, floating point, little endian. Match the sample rate and the number of channels.
  • f64be · Reads 64 bits per sample, floating point, big endian. Match the sample rate and the number of channels.

Raw PCM sample rate [Hz] (.pcm/.raw only)

Sample rate of the raw data in Hz. At 8000 Hz, 4000 frames last 0.5 s. For a container, the rate is read from the file.

Default value in the basic configuration 0.

Raw PCM channel count (.pcm/.raw only)

Number of interleaved channels in the raw data. Use 2 for the stereo fixture. A container declares its own number of channels.

Default value in the basic configuration 0.

Scrollbar

Use the horizontal or vertical scrollbar to reach fields, entries, or text outside the visible area.