# Python Libraries

## Librosa

Librosa load audio files including midi, wav files through its load() in librosa.core. This package provides a way of analyzing audio in its raw format. It does not have track information for different tracks of midi file.

The function returns

* y:np.ndarray \[shape=(n,) or (2, n)]audio time series
* sr:number > 0 \[scalar]sampling rate of y

Audio time series is a list of amplitude of the audio, normalized to (-1, 1). For instance if the value is 8192 and the file is a 16-bit wav, then this value is normalized to +0.25. Sample rate is something like 44100 for 44100 Hz audio.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xihuanzeng.gitbook.io/deep-music-generation/music-data-preparation/python-libraries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
