Apple Speech/Transcription/Embeddings Native Bridge

ai · voice, integration

packages/apple-llm/ios wraps SpeechAnalyzer, AVSpeechSynthesizer, and NLContextualEmbedding behind AI SDK interfaces. Relevant to CobaltCall voice work on iOS with zero per-minute API cost.

// Source: https://github.com/mperkins0155/ai | License: MIT | Copyright 2024-2025 Szymon Rybczak
// Provided via justclaw.it.com; keep this notice with the code.
import type { TurboModule } from 'react-native'
import { TurboModuleRegistry } from 'react-native'
import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypesNamespace'

import { addWAVHeader } from './utils'

export interface SpeechOptions {
  language?: string
  voice?: string
}

export interface VoiceInfo {
  identifier: string
  name: string
  language: string
  quality: 'default' | 'enhanced' | 'premium'
  isPersonalVoice: boolean
  isNoveltyVoice: boolean
}

export interface Spec extends TurboModule {
  getVoices(): Promise<VoiceInfo[]>
}

const NativeAppleSpeech =
  TurboModuleRegistry.getEnforcing<Spec>('

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key