.. include:: ../examples/README.rst

Play a Sound File
-----------------

:gh-example:`play_file.py`

.. literalinclude:: ../examples/play_file.py
    :language: python

Play a Very Long Sound File
---------------------------

:gh-example:`play_long_file.py`

.. literalinclude:: ../examples/play_long_file.py
    :language: python

Play a Very Long Sound File without Using NumPy
-----------------------------------------------

:gh-example:`play_long_file_raw.py`

.. literalinclude:: ../examples/play_long_file_raw.py
    :language: python

Play a Web Stream
-----------------

:gh-example:`play_stream.py`

.. literalinclude:: ../examples/play_stream.py
    :language: python

Play a Sine Signal
------------------

:gh-example:`play_sine.py`

.. literalinclude:: ../examples/play_sine.py
    :language: python

Input to Output Pass-Through
----------------------------

:gh-example:`wire.py`

.. literalinclude:: ../examples/wire.py
    :language: python

Plot Microphone Signal(s) in Real-Time
--------------------------------------

:gh-example:`plot_input.py`

.. literalinclude:: ../examples/plot_input.py
    :language: python

Real-Time Text-Mode Spectrogram
-------------------------------

:gh-example:`spectrogram.py`

.. literalinclude:: ../examples/spectrogram.py
    :language: python

Recording with Arbitrary Duration
---------------------------------

:gh-example:`rec_unlimited.py`

.. literalinclude:: ../examples/rec_unlimited.py
    :language: python

Using a stream in an `asyncio` coroutine
----------------------------------------

:gh-example:`asyncio_coroutines.py`

.. literalinclude:: ../examples/asyncio_coroutines.py
    :language: python

Creating an `asyncio` generator for audio blocks
------------------------------------------------

:gh-example:`asyncio_generators.py`

.. literalinclude:: ../examples/asyncio_generators.py
    :language: python
