Spaces:
Build error
Build error
Commit History
-
fix: ensure audio tensor is on same device as VAD model in voice denoising
The Silero VAD model was moved to GPU but the input audio tensor remained on CPU, causing a device mismatch error: 'Expected all tensors to be on the same device, but got weight is on cuda:0, different from other tensors on cpu' Solution: --------- Move the audio tensor to the same device as the VAD model before calling get_speech_timestamps() by adding .to(device) after creating the tensor. This ensures both the model and its inputs are on the same device (GPU or CPU) preventing RuntimeError during convolution operations in the VAD model.7b704bc -
fix: make download components visible after speaker separation completes
The output_files and report_file components were not becoming visible after successful speaker separation because they were only receiving values, not visibility updates. Changes: -------- - Wrap output_file_paths in gr.File(value=..., visible=True) - Wrap report_path in gr.File(value=..., visible=True) - Wrap summary in gr.JSON(value=..., visible=True) - Use gr.update(visible=True) for details_accordion This ensures all result components appear when processing completes successfully.1a6b8d0 -
fix: resolve ZeroGPU pickling errors across all audio processing services
This commit fixes pickling errors that occurred when running on HuggingFace Spaces with ZeroGPU. The errors affected all three main audio processing workflows: speaker separation, speaker extraction, and voice denoising. Root Cause: ----------- ZeroGPU's @spaces.GPU decorator serializes function arguments to transfer them to GPU workers. Two types of unpicklable objects were being passed: 1. PyTorch models and pipelines containing lambda functions and closures 2. Gradio progress callbacks (closures capturing parent scope) Solution Architecture: ---------------------- Refactored to use module-level GPU functions that only accept primitive, serializable arguments: 1. Models load fresh inside GPU context (not passed as arguments) 2. Progress callbacks stopped at web handler layer (never enter services) 3. Only primitives cross GPU boundary (arrays, strings, numbers, dicts) Changes by Layer: ----------------- ### Service Layer (src/services/): **speaker_separation.py:** - Created _r…3fb465f
-
fix: correct Speaker Extraction tab to prevent UI duplication
- Change return type from gr.Blocks to gr.Tab - Use gr.Tab() wrapper instead of gr.Blocks() - Remove duplicate heading (now part of tab title) - Fixes issue where Voice Denoising tab showed Speaker Extraction content - Fixes duplicate tab creation when switching tabs This applies the fix from aae3816f16c69e2ce1f783f2d72d3cff01aa53cb9fe2593 -
feat: implement cross-mode robustness fixes (phases 1-8)
Complete implementation of all core robustness improvements: Phase 1-2: Infrastructure - Add ErrorReport TypedDict for structured error handling - Add ProgressCallback type alias and stage constants - Configure SSL globally using certifi - Update HuggingFace API to use 'token' parameter Phase 3: Reliable Progress Reporting (US1) - Standardize float-based (0.0-1.0) progress callbacks - Update all services to emit consistent progress - Fix dictionary key access issues across web/CLI - Support both modern and legacy progress formats Phase 4: Consistent Error Handling (US2) - Implement ErrorReport with error_type categorization - Add structured error handling to all services - Generate JSON error reports in web interface - Add rich color-coded error messages in CLI Phase 5: Environment Compatibility (US3) - Verify SSL context for torch.hub and HuggingFace models - Audit all model loading for correct API parameters - Remove invalid ProcessingJob parameters Phase 6: UI State Management …95e1515 -
refactor: rename Voice Profiler to Voice Tools throughout codebase
Update all references from 'Voice Profiler' to 'Voice Tools': - CLI command headers and descriptions - Web interface title and description - Benchmark script output - Package docstrings - remove .space and .spacesrc (not needed for HF Spaces deployment) - update benchmark.py docstring to Voice Tools This aligns with the project rename completed in previous commits.03cad88 -
fix: upgrade to pyannote.audio 4.x and remove all torchaudio compatibility hacks
9ff4b56 -
fix: also correct lib/ in gitignore to only exclude root-level, add src/lib package
3ff2f18 -
fix: correct gitignore to only exclude root-level models directory, not src/models package
0456b70 -
fix: convert relative imports to absolute imports for HuggingFace Spaces compatibility
ba92724 -
fix: remove deprecated theme parameter from Gradio Blocks constructor
f272b0c -
fix: correct indentation error in web app
bb2a10f -
git commit -m "feat: add HuggingFace ZeroGPU compatibility for
GPU-accelerated inference - Add @spaces.GPU decorators to all inference methods (separation: 90s, extraction: 60s, denoising: 45s) - Implement GPU resource management with automatic CPU/GPU model transfers - Create GPUConfig module for environment detection (ZeroGPU, Spaces, local) - Add GPU utilities for safe resource allocation and cleanup - Ensure GPU cleanup within 2s using try-finally blocks - Update dependencies: spaces>=0.28.3, gradio>=5.49.1, torch>=2.4.0 - Add HuggingFace Spaces deployment configuration (.space/README.md, app.py, requirements.txt) - Maintain backward compatibility with local CPU-only environments Services modified: - src/services/speaker_separation.py - src/services/speaker_extraction.py - src/services/voice_denoising.py Tested and verified on local CPU environment. Ready for HuggingFace Spaces deployment."ffe9fdb -
feat: complete audio speaker separation feature with 3 workflows
Implement comprehensive audio processing system with speaker separation, extraction, and denoising capabilities. All 85 tasks completed across 6 phases with full test coverage and documentation. Features: - Speaker Separation: Auto-detect and separate multi-speaker audio - Speaker Extraction: Extract specific speaker using reference clip - Voice Denoising: Remove silence and background noise with VAD Implementation: - 3 core services with pyannote.audio and Silero VAD integration - AudioConcatenationUtility with equal power crossfade - CLI commands: separate, extract-speaker, denoise - Gradio web UI tabs for all workflows - Comprehensive error handling and validation - Memory optimization for 2+ hour files - Processing metadata logging with resource tracking Technical: - Models: pyannote/speaker-diarization-3.1, wespeaker embeddings, Silero VAD - Audio I/O: FFmpeg integration for M4A/WAV conversion - Quality: Equal power crossfade, zero-crossing detection - Performance: Processing ≤…cb39c05