# 0.3 Setting Things Up

### The Setup

Finally, let's write some code! In this session, we will see how to import signals from the hard drive, how to display signals and how to write signals to the hard drive.

{% file src="<https://1719691385-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MetmKF4Nky-_P8tzlc8%2F-MfzzF_bls9n8o_prpLw%2F-MfzzmJksYREoE_oSqgX%2Fspeech.wav?alt=media&token=20faa246-2525-478b-bb90-e7d9f0d13596>" %}
Download this speech file
{% endfile %}

We begin with importing the essentials.

* NumPy is for array handling,
* iPython for i/o handling audio, and
* Matplotlib to handle figures.

Let's also modify the formatting of the figures to make them neat!

```python
import numpy as np
import IPython

from scipy import signal as sp
from scipy.io import wavfile

from matplotlib import pyplot as plt
from matplotlib import style
from matplotlib import rcParams

%matplotlib inline
plt.style.use(['seaborn-deep'])
plt.rcParams.update({
    "font.serif": ["cm"],
    "mathtext.fontset": "cm",
    "figure.figsize": (12,6),
    "font.size": 24})
```

### Import a Speech File

Let's import a speech file and play the audio.

```python
Fs, s = wavfile.read('speech.wav')
s = s / 32767.0
print('sampling rate: {}Hz'.format(Fs))
IPython.display.Audio(s, rate=Fs)
```
