Skip to content

Feat: Add audio transcription example to the demo - #460

Open
GtechGovind wants to merge 1 commit into
MacPaw:mainfrom
GtechGovind:feat/demo-audio-transcription
Open

GtechGovind wants to merge 1 commit into
MacPaw:mainfrom
GtechGovind:feat/demo-audio-transcription

Conversation

@GtechGovind

Copy link
Copy Markdown
Contributor

What

I replaced the Transcribe placeholder in the demo with an audio-file transcription example. It shows the selected file and size, offers model/language/prompt options, and displays a selectable transcript with a copy action.

Why

Closes #49. The image example is already implemented; this completes the remaining audio-transcription example through the existing SDK.

Affected Areas

  • Misc → Audio → Transcribe uses the currently configured client instead of creating a separate default client. Custom providers require an explicit model ID and an audio/transcriptions-compatible endpoint.
  • File loading runs off the main thread, balances security-scoped access, and rejects unsupported extensions, empty files, folders, and files over 25 MB. Selecting a file does not upload it.
  • Requests have progress, cancellation, errors and retry. Cancelled or superseded work cannot overwrite newer state; duplicate submissions are ignored.
  • DemoChat tests cover file validation, exact query construction, success/error/retry, cancellation, late results, and configured-client replacement. Demo instructions and release-check cases are updated.

More Info

Validation:

  • swift test: 225 XCTest tests and 33 Swift Testing tests passed.
  • SDK iOS Simulator tests: the same 258 tests passed.
  • DemoChat iOS Simulator tests: all 54 tests passed, including 20 new test functions with parameterized cases.
  • Demo generic iOS Simulator build passed.
  • swift package diagnose-api-breaking-changes 0.5.2: no breaking changes.
  • git diff --check passed.

Tests use local files and injected responses, including an intercepted SDK session; no live API requests were made. Interactive Files-provider and clipboard verification remains a manual follow-up. This example does not add recording, streaming, translation, or public SDK API changes.

@GtechGovind
GtechGovind marked this pull request as ready for review October 9, 2026 08:43
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.

[Demo app] Add audio transcription example

1 participant