chapter one

1 Building Your Own AI — Getting Started

 

This chapter covers

  • A preview of the voice-enabled AI chat application you will build
  • The hardware and software you need
  • An introduction to large language models and speech recognition
  • Why running AI locally matters — and how it compares to cloud AI
  • Opening the terminal and navigating your computer with it

This book teaches you how to run a large language model (LLM) on your own computer and build a fully functional voice-enabled AI chat application -- from scratch. Basic Python fundamentals will be helpful when the project moves into coding, but the book introduces each concept as it appears.

This is a Mac-first book. The main path uses macOS, Terminal, Homebrew, VS Code, Python, Ollama, MLX Whisper, and Streamlit. If you come from iOS or macOS app development, note that this book does not use Swift or SwiftUI; it uses Python because the local AI ecosystem around Ollama, Streamlit, and model tooling is currently fastest to learn and easiest to reproduce in a book.

By the end of this book, you will speak naturally into your microphone, watch your words transcribed on screen, and receive a streaming AI response -- entirely on your Mac. No internet connection required. No subscription fees. To maintain your privacy, your voice data, your conversations, and the AI's responses never leave your machine.

1.1 Why Run AI Locally?

1.1.1 Cloud AI vs. Local AI

1.1.2 When to Use Each

1.2 What You Will Build

1.3 What You Will Need

1.3.1 Apple Silicon vs. Intel

1.4 What Is a Large Language Model?

1.5 How This Book Is Organized

1.5.1 Conventions Used in This Book

1.6 Using the Terminal to Interact with Your Computer

1.6.1 Two Ways to Talk to Your Computer

1.6.2 CLI vs. GUI: A Comparison

1.6.3 Why Use the Command Line?

1.7 Opening the Terminal on macOS

1.7.1 Method 1: Spotlight Search (Recommended)

1.7.2 Method 2: Applications Folder

1.7.3 Customizing the Appearance

1.8 Essential Commands

1.8.1 Command 1: `pwd` -- Where Am I?

1.8.2 Command 2: `ls` -- What Is Here?

1.8.3 Command 3: `cd` -- Moving Around

1.8.4 Bonus: `clear` -- A Fresh Start

1.8.5 Command 4: `mkdir` -- Creating Folders

1.8.6 What Happens When You Type a Command

1.8.7 Common Fears and Realities

1.9 Summary

1.10 Exercises