Skip to content

Latest commit

 

History

History
68 lines (61 loc) · 1.45 KB

README.md

File metadata and controls

68 lines (61 loc) · 1.45 KB

Audesc

Audesc

Audesc is an open-source library for descriptive Audio analysis, using Audesc you can get the following from the audio:

  • sampling rate
  • bit width
  • duration
  • number of samples
  • number of channels

Installation

PIP

You can install audesc with PIP by using the following command:

pip install audesc

From Source

Clone the following command

git clone https://github.com/msalhab96/audesc

cd to the directory using the following command

cd audesc

Install the package using the following command

pip install .

Supported Formats

  • WAV
  • FLAC

How to Use It

To describe WAV file

from audesc import WaveDescriber
file_path = 'my/path/to/file.wav'
aud_describer = WaveDescriber(file_path)
description = aud_describer.describe()
print(str(description))
print(description.sampling_rate)
print(description.channels_count)
print(description.duration)
print(description.bit_rate)
print(description.num_samples)

To describe FLAC file

from audesc import WaveDescriber
file_path = 'my/path/to/file.flac'
aud_describer = WaveDescriber(file_path)
description = aud_describer.describe()
print(str(description))
print(description.sampling_rate)
print(description.channels_count)
print(description.duration)
print(description.bit_rate)
print(description.num_samples)