AudioVisualizer:: AudioVisualizer is a Python application that allows users to visualize live audio input or playback of audio files. It features a graphical user interface (GUI) built with PyQt5 and displays audio waveforms in real-time using PyQtGraph.
- Live Audio Visualization: View real-time audio waveforms from a microphone or other audio input devices.
- File Playback: Load and visualize audio from WAV files.
- Recording: Record live audio and save it as a WAV file.
- Adjustable Speed and Buffer Size: Customize visualization speed and buffer size.
- Real-Time Sample Rate Display: Display the current or loaded sample rate.
- Python 3.x
- PyQt5
- PyQtGraph
- NumPy
- PyAudio
- SciPy
-
Clone the repository:
git clone https://github.com/PayalLakra/AudioVisualizer.git cd AudioVisualizer
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the application:
python main.py
-
GUI Controls:
- Start: Begin visualizing live audio input.
- Stop: Stop the audio input visualization.
- Record: Toggle recording of live audio. Save the recording as a WAV file when stopped.
- Load File: Open a WAV file and visualize its waveform.
- Speed: Select between "Fast" and "Slow" update rates for the plot.
- Buffer Size: Choose the buffer size for the x-axis range of the plot.
AudioVisualizer
Class: Main class for the GUI application, handling audio input, visualization, and recording.start_recording
Method: Initializes audio stream and starts the timer for visualization.stop_recording
Method: Stops the audio stream and timer.update_plot
Method: Updates the plot with new audio data or file data.toggle_recording
Method: Starts or stops recording audio based on the current state.load_file
Method: Loads an audio file and visualizes its waveform.update_timer_interval
Method: Adjusts the timer interval based on selected speed.update_plot_range
Method: Updates the plot range based on selected buffer size.
Audio.Visualizer.2024-08-13.13-33-00.mp4
Support and Guidance: Special thanks to http://upsidedownlabs.tech/ for their continuous support and guidance.