Skip to content

PasoStudio73/AudioReader.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AudioReader - A simple audio files reader

stable Build Status Coverage

AudioReader.jl A Julia package for reading and preprocessing audio files with support for both lossless and lossy audio formats.

Provides a unified interface for loading various audio file formats into Julia, handling format detection, sample rate conversion, and channel management automatically.

This package builds upon several key Julia packages:

Features

  • Multi-format Support: Reads both lossless (WAV, FLAC) and lossy (MP3) audio formats
  • Automatic Format Detection: Intelligently detects file format from extension and content
  • Sample Rate Handling: Built-in resampling capabilities using DSP.jl
  • Channel Management: Handles mono, stereo, and multi-channel audio files

Installation

using Pkg
Pkg.add("https://github.com/PasoStudio73/AudioReader.jl")

Quick Start

using Audioreader

# Load wav audiofile
audio = load("example.wav")

# Load wav file and convert it to mono
audio = load("example.wav"; mono=true)

# and normalize it
audio = load("example.wav"; mono=true, norm=true)

# Load an mp3 file and resample it to 8000kHz
audio = load("example.mp3"; sr=8000)

# access audio properties
data = get_data(audio)            # Get the audio data array
sr = get_sr(audio)                # Get current sample rate
origin_sr = get_origin_sr(audio)  # Get original sample rate
nchannels = get_nchannels(audio)  # Get number of channels
normalized = is_norm(audio)       # Check if data is normalized

About

Audiofiles Reader

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages