# What AI Models or Services Are Used for Enhancing Voice Dictation in FluidVoice?

> Discover the AI models enhancing FluidVoice dictation. Explore OpenAI, Apple Intelligence, Groq, local models, and custom endpoints for superior voice transcription.

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

---

**FluidVoice enhances voice dictation by sending transcribed text to configurable LLM services including OpenAI-compatible APIs, Apple Intelligence, Groq, private local models, and custom HTTP endpoints, with provider selection determined at runtime from user settings.**

FluidVoice, an open-source voice dictation application developed by altic-dev, leverages multiple AI models and services to refine and enhance raw speech-to-text output. The architecture supports both cloud-based large language models and on-device processing through a pluggable provider system defined in the Swift source code.

## Supported AI Providers and Models

The app implements a protocol-based provider architecture centered on `AIProvider` in [`Sources/Fluid/Networking/AIProvider.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/Networking/AIProvider.swift). This design allows FluidVoice to route dictation post-processing to various backends based on user configuration stored in `SettingsStore`.

### OpenAI-Compatible Services

The `OpenAICompatibleProvider` class handles requests for any service implementing the OpenAI API specification. This includes official OpenAI models (GPT-4o, GPT-4), Azure OpenAI deployments, and aggregator services like OpenRouter.

The provider constructs either a `/chat/completions` request or the newer `/responses` endpoint depending on the model configuration. In [`AIProvider.swift`](https://github.com/altic-dev/FluidVoice/blob/main/AIProvider.swift), the shared protocol ensures these providers return standardized enhancement results regardless of the underlying vendor.

### Apple Intelligence (Foundation Models)

When users select the `"apple-intelligence"` provider ID, FluidVoice bypasses the generic LLM client entirely. The `AppleIntelligenceProvider` class handles requests directly through Apple's Foundation Models framework, enabling on-device processing without external network calls.

This branch is explicitly checked in [`DictationPostProcessingService.swift`](https://github.com/altic-dev/FluidVoice/blob/main/DictationPostProcessingService.swift) before falling back to cloud-based providers.

### Groq and gpt-oss Models

FluidVoice includes specific handling for Groq-hosted models and the `gpt-oss` family. The provider detection logic in [`AIProvider.swift`](https://github.com/altic-dev/FluidVoice/blob/main/AIProvider.swift) (lines 64-70) automatically adds a `reasoning_effort` parameter when Groq-style model identifiers are detected, optimizing the request for reasoning-capable models served through Groq's inference engine.

### Private AI and Local Models

For users running self-hosted models (e.g., GGUF formats via llama.cpp or similar), the `PrivateAIIntegrationService` enables fully local dictation enhancement. When `PrivateAIProviderFeature` is enabled and the dictation prompt selection is set to **Private AI**, requests route to `PrivateAIIntegrationService` instead of remote endpoints.

This logic resides in [`DictationPostProcessingService.swift`](https://github.com/altic-dev/FluidVoice/blob/main/DictationPostProcessingService.swift) (lines 48-74), allowing offline operation using local hardware.

### Custom HTTP Endpoints

Users can configure arbitrary endpoints through the "custom:" provider prefix in the UI. The `DictationPostProcessingService` resolves these entries by extracting the URL, model name, and API key from `SettingsStore`, then passing them to `LLMClient` as a generic request configuration.

## How the Dictation Enhancement Pipeline Works

The post-processing flow follows a deterministic resolution path defined in [`DictationPostProcessingService.swift`](https://github.com/altic-dev/FluidVoice/blob/main/DictationPostProcessingService.swift):

1. **Provider Resolution**: The `process(_:dictationSlot:)` method calls `resolveProvider(settings:dictationSlot:)` to determine the selected backend from user preferences.

2. **Routing Logic**:
   - If Private AI is selected → `PrivateAIIntegrationService` handles execution
   - If `providerID == "apple-intelligence"` → `AppleIntelligenceProvider` processes locally
   - Otherwise → Generic LLM pipeline initiates

3. **Request Construction**: For generic providers, the service creates an `LLMClient.Config` and invokes `LLMClient.shared.call(config)`. The client, defined in [`LLMClient.swift`](https://github.com/altic-dev/FluidVoice/blob/main/LLMClient.swift), builds the request body with model-specific parameters including `temperature`, `reasoning_effort`, and tool call configurations.

4. **Response Processing**: The client handles both streaming and non-streaming responses, stripping thinking tokens and formatting the final text before returning it to the dictation slot.

```swift
// Conceptual flow based on DictationPostProcessingService.swift
func process(text: String, dictationSlot: DictationSlot) async throws -> String {
    let provider = resolveProvider(settings: SettingsStore.shared, 
                                   dictationSlot: dictationSlot)
    
    if provider.id == "apple-intelligence" {
        return try await AppleIntelligenceProvider.shared.enhance(text)
    }
    
    if SettingsStore.shared.usePrivateAI {
        return try await PrivateAIIntegrationService.shared.process(text)
    }
    
    let config = LLMClient.Config(
        provider: provider,
        model: SettingsStore.selectedModel,
        temperature: 0.7
    )
    
    return try await LLMClient.shared.call(config)
}

```

## Configuration and Provider Metadata

The `ModelRepository` class (in [`Sources/Fluid/Services/ModelRepository.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/Services/ModelRepository.swift)) maintains the canonical list of built-in providers including OpenAI, Groq, Cerebras, Google, Ollama, and LMStudio. It supplies default base URLs, available model lists, and display names for the settings UI.

When users select a built-in provider ID, the repository provides the connection parameters; custom providers override these with user-specified values stored in `SettingsStore`.

## Summary

- **FluidVoice supports multiple AI backends**: OpenAI-compatible APIs, Apple Intelligence, Groq, private local models, and custom HTTP endpoints.
- **Provider selection is dynamic**: Determined at runtime via `DictationPostProcessingService.resolveProvider()` based on `SettingsStore` values.
- **Architecture is protocol-based**: The `AIProvider` protocol unifies disparate backends behind a common interface in [`AIProvider.swift`](https://github.com/altic-dev/FluidVoice/blob/main/AIProvider.swift).
- **Local processing is supported**: Via `PrivateAIIntegrationService` for self-hosted models and `AppleIntelligenceProvider` for on-device Foundation Models.
- **Generic client handles cloud requests**: `LLMClient` manages request building, parameter injection (including `reasoning_effort`), and response parsing.

## Frequently Asked Questions

### Does FluidVoice require an internet connection for dictation enhancement?

No, internet connectivity is not strictly required. While cloud providers like OpenAI and Groq require network access, FluidVoice supports fully offline operation through **Apple Intelligence** (on compatible devices) and **Private AI** mode using `PrivateAIIntegrationService` with locally-hosted models via Ollama or LMStudio.

### How do I add a custom LLM provider to FluidVoice?

Navigate to the AI Settings UI and add a provider with the "custom:" prefix. Enter your endpoint URL, model name, and API key. The `DictationPostProcessingService` will route requests to your specified endpoint using the generic `LLMClient` implementation, compatible with any OpenAI-style API.

### What is the difference between Apple Intelligence and Private AI providers?

**Apple Intelligence** uses Apple's on-device Foundation Models through the `AppleIntelligenceProvider` class, requiring specific hardware and OS versions but ensuring complete privacy. **Private AI** refers to user-hosted models (e.g., GGUF files) accessed via `PrivateAIIntegrationService`, which can run on local network servers or the same machine via tools like Ollama or LMStudio.

### Which file handles the provider selection logic?

Provider resolution occurs in [`Sources/Fluid/Services/DictationPostProcessingService.swift`](https://github.com/altic-dev/FluidVoice/blob/main/Sources/Fluid/Services/DictationPostProcessingService.swift), specifically within the `resolveProvider(settings:dictationSlot:)` method and the initial branching logic of `process(_:dictationSlot:)`. This file determines whether to use `AppleIntelligenceProvider`, `PrivateAIIntegrationService`, or the generic `LLMClient` based on current settings.