Overview
The Record page is your creative workspace for capturing personal narratives. Speak naturally, and iStory’s AI handles transcription, enhancement, and permanent storage on IPFS.Tech Stack: ElevenLabs Scribe (transcription) → Google Gemini 2.5 Flash (enhancement) → IPFS (permanent storage) → Supabase (metadata)
Quick Start
Grant Microphone Permission
Your browser will prompt for microphone access. Click Allow to enable voice recording.
Start Recording
Tap the large circular microphone button. Speak clearly and naturally—AI transcription handles multi-language input.
Stop & Review
Tap the square stop button when finished. Transcribed text appears in the content area within seconds.
Recording Interface
Voice Recording (app/record/RecordPageClient.tsx:140-188)
Recording Controls
Recording Controls
Microphone Button States:
Audio Settings:
| State | Visual | Behavior |
|---|---|---|
| Idle | Blue gradient with pulse glow | Click to start recording |
| Recording | Red gradient with animated rings | Click to stop recording |
| Processing | Disabled (gray) | Cannot record during transcription/enhancement |
- Sample Rate: 16 kHz (optimized for speech)
- Echo Cancellation: Enabled
- Noise Suppression: Enabled
- Format: WebM (browser native)
AI Transcription (app/record/RecordPageClient.tsx:191-241)
How Transcription Works
How Transcription Works
Automatic Processing:Error Handling:
- Audio Upload: Recording sent to
/api/ai/transcribeas multipart form-data - ElevenLabs Scribe: Processes audio with speaker diarization and punctuation
- Text Return: Transcribed text appears in textarea (appends to existing content)
- Auto-Title: If no title set, generates “Journal Entry - ”
isTranscribing: Shows “AI is transcribing…” badgeisBusy: Disables mic button while processing- Transcription badge disappears when complete
Multi-Language Support: Transcription auto-detects language. Supports 30+ languages including English, Spanish, French, German, Japanese, and Chinese.
- Empty transcription → Toast error: “Transcription returned empty text”
- API failure → Toast shows error message from server
- Network timeout → Automatic retry after 30 seconds
Content Management
Entry Details Form (app/record/RecordPageClient.tsx:628-698)
Title Field
Give your story a memorable title. Auto-populated as “Journal Entry - ” after first recording.
Date of Memory
Backdating feature: Set the date this memory occurred (defaults to today).How it works:
story_date: User-selected date (what the story is about)created_at: System timestamp (when you saved it)- Library groups by
story_datefor chronological browsing
Perfect for journaling about past events or importing old memories.
Content Editing (app/record/RecordPageClient.tsx:741-800)
Text Enhancement with AI
Text Enhancement with AI
Gemini 2.5 Flash Enhancement:Click Enhance with AI to improve your transcription:
- Fixes grammar and punctuation
- Improves sentence flow and clarity
- Maintains your original voice and meaning
- Adds paragraph breaks for readability
preEnhanceText state. Click Revert to undo enhancement.Read Aloud (Text-to-Speech)
Read Aloud (Text-to-Speech)
Click Read Aloud to hear your story via browser TTS:
- Uses system voice (configurable in OS settings)
- Playback controls: Play/Stop
- No internet required (runs locally)
Useful for proofreading—hearing errors you might miss when reading.
Manual Editing
Manual Editing
Direct Text Input:
- Type or paste content directly into textarea
- Supports markdown-style formatting (rendered on story detail page)
- No character limit (reasonable limit: ~50,000 chars for IPFS metadata)
- Saves to
sessionStorage.estory_record_draftevery 500ms - Restored on page reload
- Cleared after successful save
Saving & Storage
Save Process (app/record/RecordPageClient.tsx:309-466)
Validation
Pre-save checks:
- User is authenticated (
authInfo.idexists) - Title is not empty
- Content is not empty
- Not already saving (
isSavingstate)
Audio Upload (Optional)
If you recorded audio:
- Audio blob sent to
/api/audio/uploadasmultipart/form-data - Uploaded to Supabase Storage bucket:
story_audio - Public URL returned:
https://{project}.supabase.co/storage/v1/object/public/story_audio/{userId}/{filename}.webm - Stored in
audio_urlfield
Audio upload uses Bearer token auth to bypass RLS—works for wallet and OAuth users.
IPFS Upload (Permanent Record)
Immutable Metadata:
- Pinned to IPFS via Pinata API
- Returns IPFS hash (e.g.,
QmX...) - Stored in
ipfs_hashcolumn
Database Save
Story saved to
stories table via /api/stories POST:Key Fields:author_id: Your user ID (UUID)author_wallet: Your wallet address (if linked)title,content: Story datahas_audio: Boolean flagaudio_url: Supabase storage URLipfs_hash: Permanent content addressis_public: Visibility settingcreated_at: System timestamp (when saved)story_date: User-selected date (when memory occurred)
API route uses RLS bypass via service role key—ensures wallet users can save.
Local Vault Encryption (Optional)
If you have vault enabled and unlocked:Encrypted Local Copy:
- Title and content encrypted with AES-256-GCM
- DEK (Data Encryption Key) retrieved from memory
- Stored in IndexedDB
vault.storiestable - Linked to cloud via
cloud_idfield - Marked as
syncedstatus
Background AI Analysis (Fire-and-Forget)
After save succeeds, triggers
/api/ai/analyze in background:- Extracts themes, life domains, sentiment
- Generates brief insight
- Saves to
story_metadatatable - Used for patterns tab in library
Analysis happens asynchronously. Results appear 5-10 seconds after saving.
Three Loading States (app/record/RecordPageClient.tsx:79-86)
- Mic button disabled when
isBusy(any operation active) - Save button shows spinner only during
isSaving - Separate badges show transcription/enhancement progress
Recording Tips
Speak Clearly and Moderately
- Find a quiet environment
- Speak at normal conversational pace
- Avoid mumbling or speaking too fast
- Position microphone 6-12 inches from mouth
Edit Before Saving
- Review transcription for accuracy
- Fix any misheard words
- Use AI enhancement for polish
- Add formatting (paragraphs, emphasis)
Stories Saved Securely
- IPFS ensures permanent availability
- Blockchain-grade immutability
- Supabase provides fast access
- Optional vault encryption for privacy
Backdating for Journaling
- Set story_date to when event occurred
- Perfect for importing old journals
- Library organizes by story_date
- Created_at tracks actual save time
Troubleshooting
Microphone access denied
Microphone access denied
Browser blocked microphone permissionSolution:
- Click padlock icon in address bar
- Find “Microphone” permission
- Change to “Allow”
- Refresh page and try again
chrome://settings/content/microphone
Firefox: Click “i” icon → Permissions → MicrophoneTranscription returns empty text
Transcription returns empty text
Possible causes:
- Audio too quiet or muffled
- Recording too short (< 1 second)
- Background noise too loud
- ElevenLabs API timeout
- Check microphone is working (test in system settings)
- Record for at least 3 seconds
- Reduce background noise
- Try manual text input instead
Save fails with 'User ID missing'
Save fails with 'User ID missing'
Authentication expiredSolution:
- Check if you’re still signed in (look for wallet address/avatar in nav)
- If not, sign in again
- Your draft should be preserved in sessionStorage
- Try saving again
Draft lost after closing tab
Draft lost after closing tab
sessionStorage is tab-specificPrevention:
- Enable local vault for auto-save
- Copy important content to notes app
- Use browser’s “Restore tabs” feature
- Don’t close tab until save confirms
Next Steps
View Your Library
Browse your stories organized by month, explore patterns, and compile books.
Enable Local Vault
Add client-side encryption for maximum privacy.