fix: replace emoji characters with ASCII-safe markers for Windows compatibility
- Replace Unicode emoji (✓, ⚠️) with [OK] and [WARN] in audio_preprocessor.py
to prevent UnicodeEncodeError on Windows console (cp1252 codec)
- Add auto-update dependencies function to bot.py for easier maintenance
- Remove setup_linux.sh (no longer needed)
- Update .gitignore to exclude VS Code launch.json
This commit is contained in:
@@ -190,16 +190,16 @@ def print_audio_analysis(file_path: str) -> None:
|
||||
print(f"\n{'=' * 50}")
|
||||
print(f"Audio Analysis: {info['path']}")
|
||||
print(f"{'=' * 50}")
|
||||
print(f" Sample Rate: {info['sample_rate']} Hz {'⚠️ (should be 22050)' if info['needs_resampling'] else '✓'}")
|
||||
print(f" Sample Rate: {info['sample_rate']} Hz {'[WARN] (should be 22050)' if info['needs_resampling'] else '[OK]'}")
|
||||
print(f" Duration: {info['duration_seconds']:.2f}s", end="")
|
||||
if info['is_too_short']:
|
||||
print(" ⚠️ (too short, aim for 5-15s)")
|
||||
print(" [WARN] (too short, aim for 5-15s)")
|
||||
elif info['is_too_long']:
|
||||
print(" ⚠️ (quite long, 5-15s is ideal)")
|
||||
print(" [WARN] (quite long, 5-15s is ideal)")
|
||||
else:
|
||||
print(" ✓")
|
||||
print(f" Channels: {'Stereo' if info['is_stereo'] else 'Mono'} {'⚠️ (will convert to mono)' if info['is_stereo'] else '✓'}")
|
||||
print(f" Max Amplitude: {info['max_amplitude']:.3f} {'✓' if info['is_normalized'] else '⚠️ (low volume)'}")
|
||||
print(" [OK]")
|
||||
print(f" Channels: {'Stereo' if info['is_stereo'] else 'Mono'} {'[WARN] (will convert to mono)' if info['is_stereo'] else '[OK]'}")
|
||||
print(f" Max Amplitude: {info['max_amplitude']:.3f} {'[OK]' if info['is_normalized'] else '[WARN] (low volume)'}")
|
||||
print(f" RMS Level: {info['rms_level']:.4f}")
|
||||
print(f" Noise Floor: {info['estimated_noise_floor']:.4f}")
|
||||
print(f"{'=' * 50}\n")
|
||||
|
||||
Reference in New Issue
Block a user