Leanpub Header

Skip to main content

Building Automatic Speech Recognition Applications from the Ground Up

A Production Guide to Voice Activity Detection, Model Selection, and Real-Time Inference

This book is 100% completeLast updated on 2026-07-03

This practical guide shows you how to build production-ready speech recognition applications from the ground up. Learn how to use Voice Activity Detection, choose the right ASR models, build real-time inference pipelines, and deploy scalable systems with hands-on examples and modern open-source tools.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

This book is a comprehensive, production-focused guide to building Automatic Speech Recognition (ASR) applications from the ground up. It covers the complete signal chain, with deep emphasis on Voice Activity Detection as the critical pre-processing step that determines what the ASR model actually sees. You will learn how to select and fine-tune state-of-the-art open-source models, design streaming and batch inference pipelines, deploy to production at scale, and continuously benchmark quality. Every chapter includes practical code examples, implementation walkthroughs, and references to leading open-source frameworks like Whisper, Vosk, ESPnet, SpeechBrain, and more. Whether you are building a voice assistant, a live captioning service, or a medical transcription pipeline, this book gives you the architectural knowledge and engineering judgment needed to ship a robust ASR system.

Share this book

Bundle

Bundles that include this book

Author

About the Author

Steve T. Publications

Steve T. is a cybersecurity leader, researcher, and engineer with more than 20 years of experience across application security, infrastructure security, vulnerability management, software development, and secure engineering practices. Having built his career alongside the growth of the modern internet, he has worked through multiple generations of technology, evolving security threats, and changing development methodologies.

He is currently part of the advanced research organization at a leading cybersecurity company, where he focuses on emerging threats, security innovation, and the practical application of research. His work involves investigating new attack techniques, evaluating emerging technologies, conducting deep technical analysis, and helping organizations better understand and manage complex security risks.

In addition to his research responsibilities, Steve leads a team of senior engineers and subject matter experts who create technical books, training programs, and educational resources for security professionals. Through this work, he helps engineers, developers, architects, and security practitioners strengthen their skills and build more secure systems.

Steve's technical expertise spans software development, reverse engineering, web application security, penetration testing, security architecture, incident response, vulnerability research, operating system internals, and secure software development. His ability to analyze systems at both the source code and binary levels enables him to bridge the worlds of software engineering, security research, and practical defense.

Over the course of his career, Steve has worked with organizations across a wide range of industries, helping them identify, assess, and remediate security weaknesses in critical applications and infrastructure. He is recognized for combining deep technical expertise with a pragmatic approach to security, focusing on solutions that are effective, sustainable, and aligned with business goals.

Through his work in research, engineering, leadership, and education, Steve continues to contribute to the advancement of cybersecurity and the development of secure, resilient technology systems.

Contents

Table of Contents

A Production Guide to Voice Activity Detection, Model Selection, and Real-Time Inference

Introduction: The Sound of Machines

Chapter 1: The ASR Landscape From DTMF to Transformers

  1. A Brief History of Speech Recognition
  2. The Transformer Revolution in ASR
  3. The Open-Source ASR Ecosystem
  4. When to Use What: A Decision Narrative
  5. Key Metrics That Matter
  6. When to Use What
  7. Key Metrics That Matter

Chapter 2: The Signal Chain Audio Preprocessing Fundamentals

  1. Digital Audio Basics
  2. Noise Reduction and Denoising
  3. Normalization, Gain Control, and Loudness Standards
  4. Feature Extraction: From Waveforms to Model Inputs
  5. Tokenization: The Bridge Between Audio and Text
  6. Normalization, Gain Control, and Loudness Standards
  7. Feature Extraction: From Waveforms to Model Inputs
  8. Tokenization: The Bridge Between Audio and Text

Chapter 3: Voice Activity Detection The Gatekeeper

  1. What VAD Does and Why It Matters
  2. Rule-Based VAD: Energy, Zero-Crossing, and CMU Sphinx
  3. Statistical VAD: Gaussian Mixture Models and HMMs
  4. Neural VAD: WebRTC, Silero, and Pyannote
  5. VAD Evaluation: DRD, F1, and ROC Curves
  6. Threshold Tuning and Post-Processing
  7. Handling Edge Cases
  8. VAD Debugging: Common Failure Modes and Fixes
  9. VAD Threshold Tuning: A Mathematical Intuition
  10. VAD in Practice: Choosing the Right Tool

Chapter 4: End-to-End ASR Architectures

  1. Connectionist Temporal Classification (CTC)
  2. Attention-Based Encoder-Decoder (AED)
  3. The Recurrent Neural Network Transducer (RNN-T)
  4. The Conformer Architecture
  5. Whisper’s Architecture: A Simplified Encoder-Decoder
  6. Whisper’s Architecture: A Simplified Encoder-Decoder
  7. Streaming vs. Non-Streaming Architectures
  8. Tokenization Deep Dive
  9. Architecture Comparison Summary

Chapter 5: Data Pipelines Fueling the Engine

  1. Public Speech Corpora
  2. Data Augmentation Techniques
  3. Transcript Cleaning and Normalization
  4. Quality Assurance and Filtering
  5. Synthetic Data Generation
  6. Data Quality Metrics and Filtering
  7. Data Versioning and Reproducibility
  8. Data Versioning and Reproducibility

Chapter 6: Model Selection and Fine-Tuning

  1. The Model Zoo: Choosing Your Base
  2. Fine-Tuning Strategies for ASR: A Deep Dive
  3. Quantization and Pruning for Efficiency: A Deeper Look
  4. Benchmarking Models: Methodology and Caveats
  5. Fine-Tuning Strategies for ASR
  6. Domain Adaptation: Medical, Legal, Technical
  7. Quantization and Pruning for Efficiency
  8. Benchmarking Models

Chapter 7: Streaming and Real-Time ASR

  1. The Challenge of Real-Time Speech Recognition
  2. Streaming ASR Fundamentals
  3. Chunked Processing with Whisper
  4. Stateful Inference and Buffer Management
  5. Real-Time Architecture Patterns
  6. Latency Budgeting
  7. End-to-End Streaming Server Walkthrough
  8. Real-Time Architecture Patterns

Chapter 8: Batch Inference and Throughput Optimization

  1. The Throughput Challenge
  2. Batching Strategies
  3. Parallel Processing and GPU Utilization
  4. Throughput Benchmarks
  5. Cost Analysis
  6. Throughput Optimization: Beyond Batching

Chapter 9: Deployment From Notebook to Production

  1. Serving Architectures
  2. Containerization and Orchestration
  3. Model Serving Frameworks
  4. Edge Deployment
  5. Horizontal Scaling Strategies for ASR Pipelines
  6. Observability with Prometheus and Grafana
  7. PII Detection and Redaction in Production
  8. Deployment Architecture Summary

Chapter 10: Multilingual and Cross-Lingual ASR

  1. Multilingual Model Architectures
  2. Language Identification
  3. Code-Switching and Mixed-Language Audio
  4. Accent Normalization and Dialect Handling
  5. Low-Resource Language Strategies
  6. Evaluation Across Languages
  7. Accent Normalization and Dialect Handling
  8. Low-Resource Language Strategies
  9. Evaluation Across Languages

Chapter 11: Testing, Benchmarking, and Quality Assurance

  1. Building Test Sets: A Production Strategy
  2. Adversarial Testing: A Practical Framework
  3. Continuous Evaluation Pipelines
  4. Human-in-the-Loop Quality Assurance
  5. WER and CER Analysis: Beyond the Aggregate Number
  6. Latency Benchmarking
  7. Robustness Testing
  8. WER and CER Analysis
  9. Latency Benchmarking
  10. Robustness Testing
  11. Continuous Evaluation Pipelines
  12. Human-in-the-Loop Quality Assurance

Chapter 12: Production Best Practices and Future Directions

  1. The Production ASR Checklist: A Narrative Guide
  2. Cost Optimization Strategies
  3. PII and Privacy in Speech Data
  4. Build vs. Buy
  5. Emerging Trends
  6. Lessons Learned: Engineering Judgment Over Benchmark Chasing
  7. Lessons Learned

Conclusion

References

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub