Spaces:
Running
Running
Commit History
-
refactor: remove legacy voice extraction pipeline (superseded by Speaker Extraction) Running
The original 'extract'/'scan' CLI commands and 'Voice Extraction (EXISTING)' web tab predate the Speaker Separation/Extraction/ Denoising feature (cb39c05) and were never updated with the later ZeroGPU pickling fixes or cross-mode robustness work. They also had zero test coverage, while the newer 'extract-speaker' command/tab (speaker_extraction.py) covers the same use case, is actively maintained, and is documented as the primary workflow. Removes: - src/services/{speech_extractor,batch_processor,voice_identifier,vad_filter}.py - src/models/{processing_job,voice_profile}.py - src/web/handlers.py, src/cli/utils.py - src/lib/format_converter.py (only consumer was batch_processor.py) - unused SegmentCollection class from models/audio_segment.py - extract/scan CLI commands from src/cli/main.py - orphaned progress-table helpers (ExtractionProgress, display_config, display_statistics, display_failures, display_vad_stats) - Legacy Voice Extraction CLI docs from README.md Verified via git…cb27c1b -
feat: add client-side Voice Clipper tab
Adds a new Voice Clipper tab that embeds a fully self-contained, browser-only waveform trim-and-splice editor (equivalent to the MemoCut Voice Memo Clipper Space), sandboxed in an iframe srcdoc. Users can drag-select ranges on a waveform, drag them into a clip tray, reorder/preview/remove clips, and export a combined WAV -- all via the Web Audio API. Audio never leaves the browser, so this workflow needs no GPU/model loading and has no upload size limit tied to processing time.3778061 -
fix: pin gradio==5.49.1 to match Space sdk_version, drop unused silero-vad dep
The 6.2.0 gradio bump in fd97113 conflicted with the HF Spaces Gradio-SDK builder, which force-installs gradio[oauth,mcp]==5.49.1 (per README's sdk_version) alongside requirements.txt. This caused a pip ResolutionImpossible build failure: ERROR: Cannot install gradio==5.49.1 and gradio>=6.2.0 because these package versions have conflicting dependencies. Also removes the unused silero-vad PyPI package; VAD is loaded via torch.hub.load("snakers4/silero-vad", ...) at runtime, not this package.59ee043
-
feat: optimize README metadata for HuggingFace search visibility
- Enhanced title to include 'Speaker Separation & Audio Extraction' - Added 17 relevant tags covering audio processing, ML tasks, and use cases - Linked 5 AI models used by the Space (pyannote, Silero VAD, Demucs, AST) - Rewrote description with SEO-optimized keywords for discoverability - Improves Space ranking for podcast, interview, and video editing searches19764b0 -
chore: upgrade Gradio to 6.2.0 and align pyannote.audio dependencies
- Upgrade gradio from >=5.49.1 to >=6.2.0 in requirements.txt and pyproject.toml - Align pyannote.audio from ==3.1.1 to >=4.0.0 in pyproject.toml to match requirements.txt - Resolve compatibility issue with torchaudio 2.8+ where set_audio_backend was removed - pyannote.audio 4.0+ is compatible with the modern torchaudio API Dependencies updated: - gradio: >=5.49.1 → >=6.2.0 (both files) - pyannote.audio: ==3.1.1 → >=4.0.0 (pyproject.toml only) Note: Gradio 6.2.0 has a known Safari UI rendering issue with certain file sizes (blob URL + range requests), but upload/processing functionality works correctly.fd97113
-
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 -
docs: add HuggingFace Spaces deployment guide and remove debug output
09108e1 -
perf: optimize Dockerfile with layer caching for faster rebuilds
edbace4 -
fix: upgrade to pyannote.audio 4.x and remove all torchaudio compatibility hacks
9ff4b56 -
fix: add mock torchaudio.backend.common.AudioMetaData for pyannote compatibility
7acac3a -
fix: pin numpy <2.0.0 for pyannote.audio compatibility
33a10e3 -
fix: add torchaudio compatibility workaround globally in app.py
8f7a761 -
fix: import spaces before any torch/CUDA imports for ZeroGPU compatibility
5b481bb -
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 -
debug: add detailed import debugging for src.models
ff074e4 -
feat: add custom Dockerfile to install package before dependencies
737f44f -
fix: simplify path setup and add debugging for import issues
34086c6 -
fix: explicitly include src package and subpackages in setup.py
8a0851d -
fix: lower Python requirement to 3.10 for HuggingFace Spaces compatibility
7e0863e -
fix: unconditionally install package on Spaces detected by SPACE_ID env var
50c17ca -
fix: auto-install package on startup if imports fail
35776aa -
fix: convert relative imports to absolute imports for HuggingFace Spaces compatibility
ba92724 -
fix: remove package install from requirements, add startup script
da93f68 -
fix: add setup.py and install package for proper imports
3077957 -
fix: install package in editable mode for proper module imports
c2d7d6f -
fix: remove deprecated theme parameter from Gradio Blocks constructor
f272b0c -
fix: correct indentation error in web app
bb2a10f -
docs: add HuggingFace Spaces metadata to README
0d0201b -
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