:index:`MP1`: LPC
########################

In this MP, you will synthesize speech
using
`linear predictive coding (LPC) <https://en.wikipedia.org/wiki/Linear_predictive_coding>`_
with an `autocorrelation-based <https://en.wikipedia.org/wiki/Autocorrelation>`_
`pitch detection algorithm <https://en.wikipedia.org/wiki/Pitch_detection_algorithm>`_
The very simple excitation model
(each frame is either 100% voiced or 100% unvoiced) will
result in an artificial buzzy sound, but it should be
intelligible.

* `mp1.zip <mp/mp1.zip>`_ contains the code.  You should download the code,
  unzip it into some directory, and then type ``jupyter-lab`` to get started.
* `mp1_notebook.html <mp/mp1_notebook.html>`_ is an example of what the Jupyter notebook will
  look like, once you've finished everything.
  
* ``python grade.py`` is how you will grade your code on your local machine.
* When it works on your machine, then you can try uploading **only**
  the file ``submitted.py`` to the MP1 assignment on `Gradescope
  <https://www.gradescope.com/courses/288629>`_.

Extra Credit
--------------

* `mp1_extra.zip <mp/mp1_extra.zip>`_ is the extra credit assignment.
  This adds one more file for you to work on (``extra.py``), and one more
  visible test file (``tests/test_extra.py``) with its accompanying
  solutions file (``extra_solutions.hdf5``).
* When you've finished revising ``extra.py``, you can test it on your
  machine by running ``python grade.py``.
* When it works on your machine, upload **only** the file ``extra.py``
  to the ``MP1 Extra Credit`` assignment on `Gradescope
  <https://www.gradescope.com/courses/288629>`_.