-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Issue: Audio Support for Language Learning
Description
GoCard's current text-based flashcard system works well for many learning domains, but language learning specifically benefits from audio content. This feature would add support for embedding audio files in flashcards, allowing users to practice listening comprehension and pronunciation as part of their language learning workflow.
Background
Audio is a critical component of effective language learning. Integrating audio capability would significantly enhance GoCard's utility for language learners while maintaining the file-based, terminal-driven approach that makes the application unique and developer-friendly.
User Story
As a language learner using GoCard, I want to include audio clips in my flashcards so that I can practice listening comprehension, reinforce correct pronunciation, and develop my speaking skills alongside written content.
Proposed Implementation
Markdown File Structure
Extend the existing Markdown support to include custom syntax for audio references:
[audio](path/to/audio.mp3 "Optional Description")Or potentially use HTML5 audio tags which would be preserved in the Markdown:
<audio controls src="path/to/audio.mp3"></audio>Storage Approach
- Audio files should be stored alongside Markdown files in the deck directory
- Support relative paths for portable deck directories
- Consider supporting both local paths and web URLs for shared resources
Technical Components to Modify
internal/ui/markdown_renderer.go: Add audio tag recognition and renderinginternal/ui/study_screen.go: Add audio playback controlsinternal/data/markdown_parser.go: Enhance to detect and process audio references- Add a new audio player component that interfaces with system audio
Terminal Compatibility
- Implement using terminal-based audio libraries compatible with major operating systems
- Provide visual indicators for audio content and playback status
- Include keyboard shortcuts for audio control (play/pause, stop, replay)
Acceptance Criteria
- Users can add audio references to card questions and answers
- Audio can be played directly within the terminal interface
- Visual indicators show when audio is available and its playback status
- Keyboard shortcuts control audio playback without disrupting the study flow
- Support for common audio formats (.mp3, .wav, .ogg)
- Audio works across supported platforms (Linux, macOS, Windows)
- Documentation is updated to explain audio capabilities and recommended practices
Technical Considerations
- Audio library selection that works cross-platform in terminal environments
- Handling different audio formats and conversion fallbacks if needed
- Efficient loading and memory management for audio files
- Consistent keyboard controls that don't conflict with existing shortcuts
- Terminal limitations and possible audio permission issues
- Proper error handling for unsupported formats or missing files
Out of Scope
- Audio recording functionality within the application
- Advanced audio editing or mixing
- Automatic speech recognition or text-to-speech
- Automatic language detection
- Audio synchronization with text highlighting
Potential Future Enhancements
- Text-to-speech generation for written content
- Basic recording capability for comparing pronunciation
- Speed control for audio playback
- A/B listening exercises (hear, then respond)
- Spaced repetition algorithms specifically tuned for audio-based learning