You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the app entry flow, including authentication/session management, login for existing users, post-signup onboarding for new users, and voice enrollment using an LLM-generated one-minute reading passage and pyannote Community-1 audio embedding.
Context
The app needs a complete entry flow before users can reach the main frontend. This includes a real authentication/session system, login for returning users, and onboarding for newly created users or any users who have not yet completed voice enrollment. After authentication succeeds, users should either be routed directly into the app or, if onboarding is incomplete, be taken through a voice-enrollment flow that captures an initial voice sample for later speaker-recognition and personalization features.
Tasks
Implement the backend authentication/session system needed to support real login behavior
Add backend endpoints for login, logout, and fetching the current authenticated session/user
Define how authenticated sessions are persisted and validated across requests
Build frontend auth bootstrap logic that checks whether a user is logged in when the app loads
Build the frontend login flow for users who already have an account
Add protected-route behavior so unauthenticated users are redirected to login
Route authenticated users with completed onboarding directly into the main app
Route newly created users, or existing users whose onboarding is incomplete, into the onboarding flow after authentication
Build a frontend onboarding flow that presents the generated passage and recording UI to the phone
Add a backend service that generates a one-minute onboarding passage using the existing LLM service pattern (app.services.llm_client.LLMClient) or a dedicated onboarding wrapper
Define the onboarding passage requirements so it is long enough for a useful voice sample and is safe to display immediately after account creation
Add frontend audio recording and upload for the onboarding read-aloud step
Add a backend endpoint to receive the recorded onboarding audio and associate it with the authenticated user
Integrate pyannote.audio with the pyannote/speaker-diarization-community-1 pipeline to derive an audio embedding from the uploaded sample
Persist the resulting voice embedding and onboarding-completion state for the user
Add validation and failure handling for invalid credentials, expired sessions, short recordings, missing audio, duplicate submissions, and embedding-generation failures
Ensure the onboarding flow can be resumed or retried if the account exists but voice enrollment is incomplete (eg. they entered email + password and didn't have time to onboard audio)
Add frontend tests for auth routing, login behavior, and onboarding behavior
Add backend tests for session creation/validation, login/logout, onboarding passage generation, audio upload, embedding persistence, and onboarding status
Acceptance Criteria
Feature works as described
No console errors
Tests pass
Existing users can log in and establish a valid authenticated session
Authenticated sessions persist across page refreshes and are validated by the backend
Summary
Implement the app entry flow, including authentication/session management, login for existing users, post-signup onboarding for new users, and voice enrollment using an LLM-generated one-minute reading passage and
pyannoteCommunity-1 audio embedding.Context
The app needs a complete entry flow before users can reach the main frontend. This includes a real authentication/session system, login for returning users, and onboarding for newly created users or any users who have not yet completed voice enrollment. After authentication succeeds, users should either be routed directly into the app or, if onboarding is incomplete, be taken through a voice-enrollment flow that captures an initial voice sample for later speaker-recognition and personalization features.
Tasks
app.services.llm_client.LLMClient) or a dedicated onboarding wrapperpyannote.audiowith thepyannote/speaker-diarization-community-1pipeline to derive an audio embedding from the uploaded sampleAcceptance Criteria
pyannoteCommunity-1Notes
app.models.user.Userwill likely need auth/session-related support if it does not already existapp.services.llm_client.LLMClientcan be reused for generating the onboarding passageusersrouterPOST /auth/loginPOST /auth/logoutGET /auth/sessionGET /onboarding/statusPOST /onboarding/passagePOST /onboarding/voice-enrollmentpyannoteintegration details should account for setup requirements from the official model card:pyannote.audiomust be installedpyannote/speaker-diarization-community-1