Before generating an audio waveform, compare the source file, the measurement method, the channel treatment, the output format, and the decision the image needs to support. This preflight check prevents a polished image from being used for a job it cannot answer. The Audio Waveform Generator creates a static SVG overview from audio decoded in the current browser tab. It does not rewrite the source audio or calculate frequency content, beats, notes, calibrated loudness, speech, transients, or musical structure.

Begin with the decision the waveform must support
A useful waveform starts with a specific purpose. Decide what you expect to learn from it before choosing a width, color, or rendering style. A time-domain peak image can show the broad amplitude shape of an audio file, while a spectrogram or calibrated analyzer answers different questions about frequency or perceived loudness.
| Planned use | What to compare | Decision before generating |
|---|---|---|
| Content or edit overview | Overall amplitude shape over time | A static min/max peak overview is suitable when frequency and calibrated loudness are not needed. |
| Side-by-side visual comparison | Dimensions, colors, and rendering method | Keep the settings consistent so differences in the images are not caused by styling. |
| Stereo or multichannel review | Whether channel identity must remain visible | The generator combines all channels, so it does not replace separate channel lanes. |
| Frequency, phase, or loudness analysis | Time-domain peaks versus spectrum or calibrated measurement | Choose a dedicated spectrogram or analyzer when those properties are the question. |
Processing location is another useful comparison. With this generator, browser decoding, peak extraction, SVG generation, previewing, and downloading all happen in the current tab. Neither the selected audio nor the generated graphic is uploaded to Lizely.
Check the source against the generator’s hard limits
Compare both the compressed file and its decoded properties before generating anything. A file that looks small on disk may expand into substantially more decoded sample data, so a file-size check alone is not enough.
| Requirement | Accepted value |
|---|---|
| Input count | One browser-decodable audio file |
| Supported formats | MP3, WAV, M4A, AAC, Ogg, WebM, or FLAC, provided the current browser and operating system support the real codec |
| Compressed file size | At most 50 MiB |
| Decoded duration | No more than five minutes |
| Decoded channels | One through eight |
| Decoded sample rate | 8,000 through 192,000 Hz |
| Decoded channel samples | No more than 30 million |
An extension or MIME label cannot guarantee that the browser will decode a file. Unsupported, corrupt, empty, or disguised files return an error. Over-limit audio is rejected as a whole, so the generator does not silently build a waveform from only the beginning.
The browser’s Web Audio API AudioBuffer supplies the decoded channel data used for the overview. Before generation, it is reasonable to check the expected duration, channel count, sample rate, and compressed size in a trusted audio-information view; the generator also enforces its own decoded-data limits.
Compare the peak method and channel treatment
The generator uses a deliberately simple min/max peak-envelope method. Its processing sequence is:
- Divide the decoded sample frames into equal, contiguous integer-index ranges.
- Find the minimum and maximum finite sample across every decoded channel in each range.
- Clamp defensive out-of-range values to the range from -1 through 1.
- Draw one vertical SVG line from each bucket’s maximum to its minimum.
This preserves short positive and negative peaks more honestly than selecting one arbitrary sample from each bucket. The first range starts at frame zero, the last reaches the final decoded frame, and accepted frames are not omitted between adjacent ranges.
Compare the requested width with the amount of decoded data. The column count is the smaller of the requested image width, 1,000, and the decoded frame count. For example, a requested width of 1,200 pixels with 2,400 decoded frames produces min(1,200, 1,000, 2,400) = 1,000 peak columns. A width above 1,000 therefore does not create additional independent measurements, while a short clip does not invent more measurements than it contains.
Channel treatment requires another decision. For multichannel audio, the output is one combined peak overview: a bucket’s minimum can come from one channel and its maximum from another. The result does not display separate left and right lanes, preserve channel identity visually, or average the channels into a new audio signal. If separate channel waveforms are required, use an audio editor that exposes each channel as its own track.
Match the SVG settings to its final destination
Compare the output dimensions with where the waveform will appear. The supported width range is 320 through 1,600 pixels, and the supported height range is 120 through 600 pixels. Background and waveform colors must use six-digit hexadecimal values. Choose colors with enough contrast for the intended display, and confirm that the fixed pixel dimensions suit the destination.
The downloaded file is a text-based SVG containing one background rectangle and a group of peak lines. Its fixed pixel dimensions have a matching viewBox, so it stays sharp when displayed at another size and can be opened in an SVG-aware editor. Extremely large print or editing workflows may still require different stroke widths or more detailed source data.
Compare the required file type as well as the appearance. The generator downloads SVG, not PNG, JPEG, video, or audio. It creates a static visual overview and never rewrites the original recording, which makes the result suitable for inspection or embedding without modifying the source media.
Generate and verify the waveform
- Choose the source file. Select one browser-decodable audio file. Confirm that the compressed file is no more than 50 MiB and that its decoded duration, channel count, sample rate, and channel-sample total remain within the stated limits.
- Set the output specifications. Choose a width from 320 through 1,600 pixels, a height from 120 through 600 pixels, and six-digit hexadecimal values for the background and waveform colors.
- Generate the local peak envelope. Open the Audio Waveform Generator, choose the file, apply the settings, and generate the waveform. Processing remains in the current browser tab, and neither the audio nor the graphic is uploaded to Lizely.
- Check the reported counts. Review the decoded frame count and peak-column count. The expected column count is the smaller of the requested width, 1,000, and the reported frame count. If you replace the file or change an option, generate again; obsolete object URLs are revoked so an older image cannot appear to represent the new input.
- Inspect the result. Examine the preview and open the expandable SVG-text inspector. Check the dimensions, matching viewBox, background color, waveform color, and peak-line structure. The preview and download use the identical SVG string.
- Download the SVG. Save the scalable SVG and open it in an SVG-aware editor if the dimensions, stroke treatment, or colors need further adjustment for the final application.
Make a final fitness check
Approve the result only when each of these questions has a clear answer:
- Does the waveform support the intended comparison rather than merely look decorative?
- Did the generator accept the complete source instead of truncating it?
- Are the reported frame and peak-column counts consistent with the selected width and decoded audio?
- Is a combined multichannel overview acceptable, or are separate channel lanes required?
- Do the SVG dimensions and colors fit the page, composition, publication, or print destination?
- Is the image being asked to report frequency, loudness, phase, or another property it does not calculate?
A peak waveform is not a calibrated loudness meter. Two recordings can show similar peaks while sounding very different because perceived loudness depends on duration, frequency balance, dynamics, and playback conditions. The image is also not a spectrogram: time runs from left to right, but each vertical line represents a sample-amplitude range rather than frequency. Do not use the picture to diagnose hearing or equipment problems, clipping history, phase, or mastering compliance.
When the source, method, channels, dimensions, and intended decision all align, the inspected SVG is ready to download as a separate visual asset while the original audio remains unchanged.
Related reading: What Should I Review After I Generate an Audio Waveform?.
Related reading: What Should I Do If I Cannot Generate an Audio Waveform?.