Conversation
📝 WalkthroughWalkthroughThis pull request introduces a complete Text-to-Speech (TTS) feature for reading posts aloud. It adds the Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant TTSControls
participant ttsSettings as Settings<br/>(AsyncStorage)
participant Speech as Expo.Speech
User->>TTSControls: Tap Play
activate TTSControls
TTSControls->>ttsSettings: Load TTS Settings
activate ttsSettings
ttsSettings-->>TTSControls: Return Voice/Rate/Pitch
deactivate ttsSettings
TTSControls->>TTSControls: Extract Plain Text<br/>from Post
alt Text Available
TTSControls->>Speech: Speech.speak(text, settings)
activate Speech
Speech-->>TTSControls: onStart Callback
TTSControls->>TTSControls: Update isPlaying=true
User->>TTSControls: Tap Pause (or done)
Speech-->>TTSControls: onDone Callback
TTSControls->>TTSControls: Update isPlaying=false
deactivate Speech
else No Readable Content
TTSControls->>TTSControls: Log Warning & Hide
end
deactivate TTSControls
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Localization
Chores
✏️ Tip: You can customize this high-level summary in your review settings.