# What Programming Language Is Used for FluidVoice? A Deep Dive into the Swift-Based Codebase

> Discover the programming language behind FluidVoice. This article explores the Swift and SwiftUI codebase, revealing how Swift powers its modern macOS interface and CoreAudio integration.

- Repository: [ALTIC/FluidVoice](https://github.com/altic-dev/FluidVoice)
- Tags: deep-dive
- Published: 2026-07-08

---

**FluidVoice is built almost entirely in Swift**, leveraging Swift 5.9 as the minimum toolchain alongside SwiftUI for the modern macOS interface, with only a minimal C bridging layer handling low-level CoreAudio operations.

The open-source repository `altic-dev/FluidVoice` demonstrates a contemporary Apple platform architecture where Swift powers every layer from the user interface to business logic. This article examines the specific implementation details, key source files, and architectural decisions that establish Swift as the dominant programming language for this voice transcription application.

## Swift as the Primary Language for FluidVoice

The codebase contains hundreds of `.swift` files implementing the app's UI, business logic, and integration layers. According to the repository structure, Swift serves as the single source of truth for functionality ranging from the app entry point to audio transcription services.

### Package Manifest and Toolchain Requirements

The [`Package.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Package.swift) file at the repository root explicitly declares Swift 5.9 as the minimum required toolchain, confirming the language version and dependency management approach. This manifest file pins the Swift ecosystem and governs how the project builds across different macOS environments.

```swift
// Package.swift declares Swift 5.9 minimum
// swift-tools-version:5.9

```

This version requirement enables modern Swift concurrency features and SwiftUI APIs used throughout the application.

### UI Layer Implementation with SwiftUI

FluidVoice adopts **SwiftUI** for its declarative user interface, moving away from traditional AppKit approaches. The primary entry point resides in [`Sources/Fluid/fluidApp.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/fluidApp.swift), which sets up the SwiftUI `App` protocol and injects service dependencies into the view hierarchy.

```swift
@main
struct FluidVoiceApp: App {
    @StateObject private var appServices = AppServices()   // Swift object that wires up all services
    var body: some Scene {
        WindowGroup {
            ContentView()
                .environmentObject(appServices)            // inject into SwiftUI hierarchy
        }
    }
}

```

The main interface composition lives in [`Sources/Fluid/ContentView.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/ContentView.swift), while specialized views like [`CommandModeView.swift`](https://github.com/altic-dev/FluidVoice/blob/main/CommandModeView.swift) handle specific interaction modes. This SwiftUI-centric approach ensures type-safe UI code with reactive state management.

### Business Logic and Audio Services

The core transcription functionality relies on Swift-based service wrappers that coordinate between the UI and underlying audio engines. In [`Sources/Fluid/Services/WhisperProvider.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/Services/WhisperProvider.swift), Swift implements the speech-to-text orchestration:

```swift
func startTranscription(for audioBuffer: AVAudioPCMBuffer) async throws -> String {
    let whisper = WhisperModel()               // Swift wrapper around the CoreML Whisper model
    let result = try await whisper.transcribe(audioBuffer)
    return result.text                         // returns the recognized string
}

```

Similarly, [`Sources/Fluid/Services/TranscriptionProvider.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/Services/TranscriptionProvider.swift) coordinates typing actions and AI provider integrations, while [`Sources/Fluid/UI/AISettingsView.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/UI/AISettingsView.swift) manages configuration interfaces—all implemented in Swift.

### Data Persistence Layer

User preferences and transcription history persist through Swift-native storage mechanisms. The [`Sources/Fluid/Persistence/SettingsStore.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/Persistence/SettingsStore.swift) file implements a `UserDefaults`-backed repository using pure Swift:

```swift
func setLaunchAtLogin(_ enabled: Bool) {
    store.setValue(enabled, forKey: SettingsKey.launchAtLogin)   // Swift `UserDefaults`‑backed store
}

```

This approach eliminates external database dependencies, keeping the entire persistence layer within Swift's type system.

## The C Bridging Layer for Low-Level Audio

While Swift dominates the codebase, FluidVoice includes one critical C file for hardware access: [`Sources/Fluid/CoreAudioCaptureSupport.c`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/CoreAudioCaptureSupport.c). This bridging layer provides low-level CoreAudio integration that Swift cannot directly access without unsafe pointers or complex interoperability overhead.

The C implementation handles raw audio buffer capture from macOS hardware, feeding data into Swift wrappers through carefully designed memory-safe boundaries. This represents the sole non-Swift component in an otherwise homogeneous Swift codebase.

## Code Examples from the FluidVoice Repository

The following patterns demonstrate typical Swift usage across different architectural layers:

**App Bootstrap Pattern** ([`fluidApp.swift`](https://github.com/altic-dev/FluidVoice/blob/main/fluidApp.swift)):
- Uses `@main` attribute for entry point
- Leverages `@StateObject` for service lifecycle management
- Employs `environmentObject` for dependency injection

**Async/Await Transcription** ([`WhisperProvider.swift`](https://github.com/altic-dev/FluidVoice/blob/main/WhisperProvider.swift)):
- Modern Swift concurrency with `async throws`
- Wrapper pattern for CoreML models
- Type-safe buffer handling

**UserDefaults Abstraction** ([`SettingsStore.swift`](https://github.com/altic-dev/FluidVoice/blob/main/SettingsStore.swift)):
- Enum-based key management (`SettingsKey`)
- Strongly typed storage methods
- Swift-native value persistence

## Summary

- **FluidVoice is primarily a Swift codebase**, built with Swift 5.9 as declared in [`Package.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Package.swift).
- **SwiftUI drives the entire user interface**, from the main `ContentView` to specialized mode views like `CommandModeView`.
- **Business logic and audio processing** use Swift concurrency features, with services like `WhisperProvider` wrapping CoreML models.
- **Single C file exception**: [`CoreAudioCaptureSupport.c`](https://github.com/altic-dev/FluidVoice/blob/main/CoreAudioCaptureSupport.c) provides the only non-Swift code for low-level audio hardware access.
- **Persistence relies on Swift-native** `UserDefaults` abstractions rather than external databases or Objective-C legacy code.

## Frequently Asked Questions

### Is FluidVoice written entirely in Swift?

Almost entirely. The repository contains hundreds of `.swift` files covering UI, business logic, and data persistence, with exactly one C file ([`CoreAudioCaptureSupport.c`](https://github.com/altic-dev/FluidVoice/blob/main/CoreAudioCaptureSupport.c)) serving as a bridge to CoreAudio. No Objective-C or other languages appear in the source tree.

### What version of Swift does FluidVoice require?

The project requires **Swift 5.9** minimum, as explicitly declared in the [`Package.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Package.swift) manifest. This version enables modern concurrency features and SwiftUI APIs used throughout the application.

### Does FluidVoice use SwiftUI or AppKit?

FluidVoice uses **SwiftUI** exclusively for its interface. The entry point in [`fluidApp.swift`](https://github.com/altic-dev/FluidVoice/blob/main/fluidApp.swift) implements the SwiftUI `App` protocol, and views like [`ContentView.swift`](https://github.com/altic-dev/FluidVoice/blob/main/ContentView.swift) leverage declarative SwiftUI syntax rather than imperative AppKit programming.

### Why does FluidVoice use C code?

The single C file ([`CoreAudioCaptureSupport.c`](https://github.com/altic-dev/FluidVoice/blob/main/CoreAudioCaptureSupport.c)) provides low-level access to macOS CoreAudio APIs for hardware audio capture. Swift can interoperate with C through bridging headers, but the direct C implementation offers cleaner memory management for raw audio buffers that require pointer arithmetic unsafe in Swift.