Add split metadata attribute to audio_files#379
Conversation
Track whether an audio file was generated via the split-text flag by accepting a `split` param in the generate-voice API and persisting it in the audio_files usage metadata. The frontend now sends `split: true` for segment generations and retries. https://claude.ai/code/session_01RBKEv4AdxCJPX3rCP9B7b6
|
|
|
lifecycle hook 'setup' failed with exit code 127. output: bash: line 1: pnpm: command not found. retry the operation if the failure looks flaky (network blips, transient rate limits). do NOT retry if the script is broken (missing commands, syntax errors) or the error is persistent. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request introduces a split flag to the voice generation workflow, enabling the API to track segmented text processing. The API route now parses the split parameter and includes it in usage metadata, while the AudioGenerator component has been updated to pass this flag. Feedback suggests extending this tracking to usage_events and PostHog analytics for better feature visibility and consistency.
| usage: { | ||
| ...usage, | ||
| userHasPaid, | ||
| split: isSplit, |
There was a problem hiding this comment.
The split attribute is correctly added to the audio_files usage metadata here. However, for complete feature tracking and consistent analytics, this flag should also be included in the usage_events metadata (line 633) and the PostHog event tracking (lines 210 and 647). Ensuring consistency across all tracking mechanisms is recommended for better visibility into the adoption of the split-text feature.
|
Claude finished @gianpaj's task in 2m 55s —— View job Claude Code Review
SummaryThe PR cleanly threads a Two things to address before merging — one definitely-breaking, one analytics-consistency: 🛑 Tests will fail on this branch
After this PR, every call site adds
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56f176f4a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds split-generation metadata tracking for audio files so split-text segment generations can be identified after persistence.
Changes:
- Adds a
splitflag to frontend generate-voice requests for split segment generation and retries. - Parses the
splitrequest field in the generate-voice API. - Persists
splitintoaudio_files.usagemetadata.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
apps/web/components/audio-generator.tsx |
Sends split: true for split segment generation and retry requests. |
apps/web/app/api/generate-voice/route.ts |
Reads the split request field and stores it in audio file usage metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|

Track whether an audio file was generated via the split-text flag by
accepting a
splitparam in the generate-voice API and persisting it inthe audio_files usage metadata. The frontend now sends
split: trueforsegment generations and retries.
https://claude.ai/code/session_01RBKEv4AdxCJPX3rCP9B7b6