Voice import: spoken audio → recipe (Whisper → text extraction)#85
Merged
Conversation
New POST /v1/recipes/import/voice accepts an audio file, transcribes it via the existing Whisper provider, and extracts a recipe from the transcript -- reusing the text-extraction path. Phase 2 of unified multi-source import. - service: ImportFromVoice (transcribe -> ExtractRecipeFromText -> save); new settable SpeechProvider field on ImportService. - handler/router: multipart endpoint (audio field, optional format), 25MB Whisper limit; wired to the Whisper provider already constructed for cook mode. Tests: ImportFromVoice (success/empty-transcript/transcription-error) + multipart handler (success/missing-audio). Full suite green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BU4UWZutHd1AnK3XAf7H19
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Phase 2 of unified multi-source import —
POST /v1/recipes/import/voice. Upload spoken audio (a recipe read or described aloud); it's transcribed via the existing Whisper provider and run through the same text-extraction path, then saved. Voice transcription was previously wired only to cook mode — this reuses it for capture.How
service—ImportFromVoice(audio, format)=TranscribeAudio→ExtractRecipeFromText→createImportedRecipe(mirrorsImportFromText). New settableSpeechProviderfield onImportService, set in the router from the Whisper provider already built for cook mode.handler+router— multipartaudiofield (+ optionalformat), 25 MB cap (Whisper's file limit),ExtractionErrorcodes → 422. Format defaults from the filename extension; the provider'saudioFilePathalready normalizes/validates it.Tests
ImportFromVoiceservice (success, empty transcript, transcription error) + multipart handler (success, missing audio).go test ./... -count=1→ green (11 packages, 0 failures).Follow-ups (not in this PR)
🤖 Generated with Claude Code
https://claude.ai/code/session_01BU4UWZutHd1AnK3XAf7H19