Learn R Programming

whisper (version 0.1.0)

load_audio: Load and Preprocess Audio

Description

Load audio from file, convert to mono, resample to 16kHz.

Usage

load_audio(file)

Value

Numeric vector of audio samples normalized to -1 to 1 range

Arguments

file

Path to audio file (WAV, MP3, etc.)

Examples

Run this code
# Load included sample audio
audio_file <- system.file("audio", "jfk.mp3", package = "whisper")
samples <- load_audio(audio_file)
length(samples)
range(samples)

Run the code above in your browser using DataLab