config.py:
- Add AUDIO_SILENCE_THRESHOLD, AUDIO_SILENCE_MARGIN, AUDIO_MIN_DURATION,
AUDIO_MAX_DURATION so all audio tunables live in one place
whisper_main.py:
- RobotEar.get_text() now owns the full pipeline: silence trimming,
duration guards, WAV write, Whisper transcription with all options
- _fix_recognition() moved here from RobotApp (ASR post-processing
belongs in the ear layer, not the application layer)
- Add `import re`, `import config`; remove unused `sounddevice` import
voice_main.py:
- Remove `import scipy.io.wavfile` (WAV handling moved to whisper_main)
- get_audio_text() is now a one-liner: return self.ear.get_text(self.audio_frames)
- Remove _fix_recognition() (lives in RobotEar now)
Closes#9
whisper_main.py:
- Remove RobotEar.start_recording() and record_callback() which called
the nonexistent sd.start_stream() API (correct API is sd.InputStream).
These methods were never called by voice_main.py and contained a broken
sounddevice API call that would raise AttributeError (#2).
- Remove unused recording_buffer field
- Translate Chinese comment/docstring to English (#5)
voice_main.py:
- Move `import scipy.io.wavfile as wav` from inside get_audio_text()
function body to module top-level where all imports belong (#4 related)
- Sort imports: stdlib before third-party, local last
- Remove Chinese comment, replace with English equivalent