Skip to main content
Learn how to evaluate the accuracy of your AssemblyAI streaming transcripts using Word Error Rate (WER), the industry-standard metric for measuring speech-to-text performance. This guide walks you through setting up a complete benchmarking workflow to measure how well your streaming implementation performs against a reference transcript.

Quickstart

Step-by-step implementation

  1. Install the required dependencies
  1. Import the necessary libraries
  1. Set up configuration and transcript collection Configure your API key, audio file settings, and create a global variable to store streaming transcripts. Your streaming session will append to this variable as it processes audio, and you’ll use it for WER analysis.
  1. Configure streaming audio processing Stream your audio file to the AssemblyAI endpoint. The on_message function captures final transcripts and appends them to your collection variable.
  1. Prepare your reference transcript Define the ground truth transcript for comparison. This serves as your accuracy benchmark for the WER calculation.
Pro tip: Create a high-quality reference transcript by first transcribing your audio file with AssemblyAI’s Universal-3.5 Pro model, then manually reviewing and correcting any errors to achieve 100% accuracy.
Ground truth quality directly affects WER results. Human transcriptions often contain systematic errors — missing filler words, incorrect proper nouns, and simplified speech patterns. If your reference transcript has errors, your WER score will be misleading. For detailed guidance on auditing ground truth files, see the streaming evaluation guide.
  1. Initialize text normalization Set up the normalizer and create your WER calculation function to ensure consistent text formatting before comparison.
  1. Calculate your WER score Run the final calculation to measure transcription accuracy.

Next steps

WER is a useful starting point, but it treats all errors equally — trivial formatting differences are penalized the same as critical errors like wrong names or hallucinated words. Consider complementing your WER analysis with Semantic WER, which normalizes equivalent words and phrases before calculating WER so that differences like dr. vs doctor or 1300 vs thirteen hundred aren’t counted as errors. For a complete evaluation framework, see the streaming evaluation guide.