Spaces:
Sleeping

ABAO77 commited on
Commit
225134a
Β·
1 Parent(s): cc06ed6

feat: Implement ultra-optimizations for pronunciation assessment system

Browse files

- Removed singleton pattern for thread safety and independent instances.
- Enhanced G2P object reuse to avoid redundant creation.
- Introduced smart parallel processing based on text length and system resources.
- Optimized LRU cache sizes for word and text phoneme lookups.
- Added pre-computed phoneme dictionary for common English words.
- Implemented object pooling for G2P and comparator instances.
- Added batch processing capability for efficient multiple assessments.
- Introduced lazy loading for heavy dependencies to improve performance.
- Implemented audio feature caching based on file modification time.
- Enhanced resource management with intelligent threading strategies.

Performance improvements target 80-85% faster processing time, achieving significant reductions in overall assessment duration.

3 files changed +848 -71
Files changed (3)
OPTIMIZATION_SUMMARY.mdAdded+268
src/apis/controllers/speaking_controller.py+425-71
test_optimizations.pyAdded+155