Skip to content

OSSSpeechKit 1.0: Modern async API, iOS 17, SPM-only distribution#48

Merged
AppDevGuy merged 2 commits into
masterfrom
feature/major-version-update
Jul 13, 2026
Merged

OSSSpeechKit 1.0: Modern async API, iOS 17, SPM-only distribution#48
AppDevGuy merged 2 commits into
masterfrom
feature/major-version-update

Conversation

@AppDevGuy

Copy link
Copy Markdown
Owner

OSSSpeechKit 1.0: Modern async API, iOS 17, SPM-only distribution

Pull Request Notes

Summary

This PR ships OSSSpeechKit 1.0.0, a major modernization of the library. It introduces an instance-based, async/await API centered on OSSSpeechEngine, replaces subclass-based voice/utterance configuration with value types, adds a runtime-aware language catalog, and moves distribution exclusively to Swift Package Manager with an iOS 17 minimum deployment target.

Legacy APIs (OSSSpeech.shared, OSSVoice, OSSUtterance, delegate-based recognition) remain available but are deprecated to allow incremental migration.

What's New

  • OSSSpeechEngine — Main-actor-isolated engine for speech synthesis and recognition with typed OSSSpeechError failures
  • Async recognitionrecognitionEvents(locale:) returns an AsyncThrowingStream of OSSSpeechRecognitionEvent (partial, completed, availability, cancelled)
  • Continuous dictationcontinuousRecognitionEvents(locale:) with pauseRecognition(), resumeRecognition(), and finishRecognition() for long-running sessions with segment timestamps
  • OSSLanguage catalog — Display metadata, runtime synthesis voice lookup, recognition support checks, and Unicode flagEmoji / UIKit renderedFlagImage(pointSize:)
  • Value-type configurationOSSVoiceConfiguration and OSSUtteranceConfiguration replace OSSVoice / OSSUtterance subclasses
  • Privacy manifestPrivacyInfo.xcprivacy bundled with the package
  • Example app — New recording session UI (RecordingSessionViewController, RecordingSessionModel) demonstrating continuous recognition
  • Docs & migration — Updated README.md, new MIGRATION.md and CHANGELOG.md, regenerated Jazzy API docs

Breaking Changes

Area Before (0.x) After (1.0)
Minimum iOS Earlier targets iOS 17+
Installation CocoaPods + SPM SPM only (historical 0.3.3 pod remains resolvable but unsupported)
API style OSSSpeech.shared singleton + delegates Instance-based OSSSpeechEngine with async/await
Voice selection Silent fallback to unavailable voices Throws OSSSpeechError.voiceUnavailable
Recognition Delegate callbacks (didFinishListening, etc.) Async event streams; call cancelRecognition() to stop
Language/flags OSSVoiceEnum.allCases + image flags OSSLanguage.catalog + flagEmoji / rendered images

Deprecated (still present)

  • OSSSpeech / OSSSpeech.shared
  • OSSVoice / OSSUtterance
  • OSSSpeechDelegate and delegate-based recognition
  • OSSVoiceEnum catalog and image flag access

See MIGRATION.md for side-by-side migration examples.

Infrastructure

  • Swift tools version bumped to 6.0; package targets iOS 17
  • CocoaPods podspec and Example Podfile removed
  • CI moved to updated GitHub Actions workflow; Travis config removed
  • Example project links the local package directly (no CocoaPods workspace)

Test Plan

  • swift test passes (package tests under Example/Tests)
  • Example app builds and runs on iOS 17+ device/simulator
  • Speech synthesis works for a catalog language with installed voices
  • One-shot recognition (recognitionEvents) produces partial and final transcripts
  • Continuous recognition session: start → pause → resume → finish
  • Permission denial surfaces as OSSSpeechError (not silent failure)
  • Voice unavailable for locale throws OSSSpeechError.voiceUnavailable
  • Legacy OSSSpeech API still compiles with deprecation warnings
  • SPM integration from a clean Xcode project resolves 1.0.0

Release OSSSpeechKit 1.0 with a modern async API, iOS 17 baseline,
and SPM-only distribution.

Introduces OSSSpeechEngine for instance-based synthesis and recognition,
OSSLanguage catalog with runtime capability checks, value-type voice and
utterance configuration, continuous dictation with pause/resume, and a
privacy manifest. Legacy singleton and delegate APIs are deprecated but
retained for incremental migration. CocoaPods support is removed for
1.0+; see MIGRATION.md for upgrade guidance.
@AppDevGuy
AppDevGuy merged commit f6fa23f into master Jul 13, 2026
2 checks passed
@AppDevGuy
AppDevGuy deleted the feature/major-version-update branch July 13, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant