Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

audio2numpy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio2numpy

Load audio file to numpy array

  • 0.1.2
  • PyPI
  • Socket score

Maintainers
1

audio2numpy

Build Status

Description

audio2numpy load an audio file and directly ouputs the audio data as a numpy array and its sampling rate. Supports .wav, .aiff via python's standard library, and .mp3 via ffmpeg.

Installation

Using pip:

pip install audio2numpy

FFmpeg for decoding mp3

audio2numpy requires ffmpeg to decode mp3 files. You would need to install ffmpeg in order to have mp3 support.

macOS

homebrew install ffmpeg

Linux

sudo apt-get install ffmpeg

Check here for other installation methods for different Linux distributions.

Windows

Usage

from audio2numpy import open_audio
fp = "./examples/word.mp3"  # change to the correct path to your file accordingly
signal, sampling_rate = open_audio(fp)

Version History

0.1.2 (20.08.2019)

Add instructions to install ffmpeg if load mp3 failed with ffmpeg backend not available.

0.1.1 (14.08.2019)

Initial release.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc