weixin-minigame-tutorial icon indicating copy to clipboard operation
weixin-minigame-tutorial copied to clipboard

testfeat: Add initial pronunciation practice tool

Open jokemon opened this issue 9 months ago • 0 comments

This commit introduces a new web application designed to help you improve your English pronunciation.

Key features include:

  • File Upload: You can upload a TXT file containing English text and an MP3 audio file of your reading.
  • Speech-to-Text (STT): The backend uses Google Cloud Speech-to-Text (GCP STT) to transcribe your audio. (Requires GCP setup).
  • Text Comparison: The original text is compared with the transcribed text using difflib to identify discrepancies.
  • Results Display: The frontend shows the original text, the transcribed text, and a highlighted diff of the comparison.
  • Issue Storage: Identified pronunciation differences (problematic words/phrases) are stored in your session.
  • Exercise Page: A dedicated page (/exercise) displays these stored issues, providing targeted practice material.
  • Backend & Frontend: Implemented using Flask for the backend and vanilla JavaScript for the frontend.
  • Unit Tests: Basic unit tests for the Flask backend logic have been added, covering file handling, STT mocking, session management, and page rendering.

The tool is structured within the pronunciation_practice_tool directory, containing templates, static assets, upload handling, and tests.

jokemon avatar May 21 '25 07:05 jokemon