<commit_before>#!/usr/bin/env python
"""
This plot displays the audio spectrum from the microphone.

Based on updating_plot.py
"""
# Major library imports
import pyaudio
from numpy import zeros, linspace, short, fromstring, hstack, transpose
from scipy import fft

# Enthought library imports
from chaco.default_colormaps import jet
from enable.api import Window, Component, ComponentEditor<commit_msg>ENH: improve error message when pyaudio is not installed<commit_after>#!/usr/bin/env python
"""
This plot displays the audio spectrum from the microphone.

Based on updating_plot.py
"""
import sys

# Major library imports
try:
    import pyaudio
except ImportError:
    sys.exit('You need to install pyaudio to installed to run this demo.')
    
from numpy import zeros, linspace, short, fromstring, hstack, transpose
from scipy import fft

# Enthought library imports
from chaco.default_colormaps import jet
from enable.api import Window, Component, ComponentEditor
{'fraction_non_alphanumeric': 0.06508264462809918, 'fraction_numerical': 0.0, 'mean_word_length': 5.251612903225807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2744328', 'n_tokens_mistral': 273, 'n_tokens_neox': 262, 'n_words': 113}