SwiftWhisper  by exPHAT

Swift SDK for audio transcription

created 2 years ago
711 stars

Top 49.2% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Swift package for easy integration of OpenAI's Whisper speech-to-text model into iOS, macOS, and other Apple platforms. It targets Swift developers seeking to add robust transcription capabilities to their applications, leveraging the performance of whisper.cpp.

How It Works

SwiftWhisper acts as a Swift wrapper around the whisper.cpp library, enabling direct use of Whisper models within Swift projects. It supports loading Whisper models and processing audio data, with optional Core ML acceleration for enhanced performance on Apple hardware. The library provides delegate methods for real-time progress updates and transcribed segments.

Quick Start & Requirements

  • Install via Swift Package Manager: Add https://github.com/exPHAT/SwiftWhisper.git to your Package.swift or Xcode's Package Manager tab.
  • CoreML Support: Requires a -encoder.mlmodelc file alongside the main model file.
  • Audio Conversion: AudioKit is recommended for converting audio to 16kHz PCM float arrays.
  • Performance: For optimal speed, build in "Release" configuration or use the fast branch via a specific revision.

Highlighted Details

  • Swift wrapper for whisper.cpp.
  • Supports Core ML acceleration for Apple hardware.
  • Provides delegate methods for progress and segment updates.
  • Includes an AudioKit example for audio preprocessing.

Maintenance & Community

The project is hosted on GitHub. No specific community channels or active maintainer information are detailed in the README.

Licensing & Compatibility

The project appears to be MIT licensed, allowing for commercial use and integration into closed-source applications.

Limitations & Caveats

Transcription performance is significantly impacted by the build configuration (Debug vs. Release). Core ML support requires specific model file naming and placement. Audio conversion to the required PCM format is an additional step for developers.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
46 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.