8000 GitHub - rryam/AuralKit: Easily use SpeechAnalyzerAPI
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

rryam/AuralKit

Repository files navigation

AuralKit

A Swift library for speech-to-text transcription using Apple's new SpeechAnalyzer APIs.

Features

  • Simple API: Start transcribing with a single method call
  • Live Transcription: Real-time speech recognition with partial results
  • SwiftUI Integration: Observable class that works with SwiftUI
  • Fluent Configuration: Chain method calls to customize behavior
  • Multiple Languages: Support for various speech recognition languages
  • Quality Settings: Configurable processing quality levels

Requirements

  • iOS 26.0+, macOS 26.0+, visionOS 26.0+
  • Swift 6.2+

Usage

Simple Transcription

// One-shot transcription
let text = try await AuralKit.startTranscribing()

// With configuration
let auralKit = AuralKit()
    .language(.spanish)
    .quality(.high)
    .includePartialResults()
    .includeTimestamps()

let text = try await auralKit.startTranscribing()

Live Transcription

let auralKit = AuralKit()
try await auralKit.startLiveTranscription { result in
    print("Transcribed: \(result.text)")
}

SwiftUI Integration

struct ContentView: View {
    @StateObject private var auralKit = AuralKit()
    
    var body: some View {
        VStack {
            Text(auralKit.currentText)
            
            Button(auralKit.isTranscribing ? "Stop" : "Start") {
                Task {
                    try await auralKit.toggle()
                }
            }
        }
    }
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License. See LICENSE file for details.

About

Easily use SpeechAnalyzerAPI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0