Shows a live wave as you speak and lets you save as MP3.
If you prefer not to code, you can use these "Ready-to-Go" web tools to see waveforms: Download Audio Wave Show How Live mp3
Best for recording and seeing the wave in real-time. Shows a live wave as you speak and lets you save as MP3
If you want to build a tool that shows a live wave and saves it as an MP3, you can use the following script. To see a live waveform of your audio,
To see a live waveform of your audio, you generally have three paths depending on your technical comfort:
Technically, an MP3 is a "compressed container." You cannot "download" a live wave as an MP3 until the recording is finished or "finalized," because the file needs a header that tells the player how long the audio is.
import sounddevice as sd import numpy as np import matplotlib.pyplot as plt from scipy.io.wavfile import write # Settings fs = 44100 # Sample rate seconds = 5 # Duration print("Recording...") # Record audio myrecording = sd.rec(int(seconds * fs), samplerate=fs, channels=1) sd.wait() # Wait until recording is finished print("Done!") # Plotting the Waveform plt.plot(myrecording) plt.title("Live Audio Waveform") plt.xlabel("Samples") plt.ylabel("Amplitude") plt.show() # Save as WAV (then convert to MP3) write('output.wav', fs, myrecording) Use code with caution. Copied to clipboard 🌐 Web-Based Visualizers