CutScript is a local-first, Descript-like video editor where you edit video by editing text. Delete a word from the transcript and it's cut from the video. Features: - Word-level transcription with WhisperX - Text-based video editing with undo/redo - AI filler word removal (Ollama/OpenAI/Claude) - AI clip creation for shorts - Waveform timeline with virtualized transcript - FFmpeg stream-copy (fast) and re-encode (4K) export - Caption burn-in and sidecar SRT generation - Studio Sound audio enhancement (DeepFilterNet) - Keyboard shortcuts (J/K/L, Space, Delete, Ctrl+Z/S/E) - Encrypted API key storage - Project save/load (.aive files) Architecture: - Electron + React + Tailwind (frontend) - FastAPI + Python (backend) - WhisperX for transcription - FFmpeg for video processing - Multi-provider AI support Performance optimizations: - RAF-throttled time updates - Zustand selectors for granular subscriptions - Dual-canvas waveform rendering - Virtualized transcript with react-virtuoso Built on top of DataAnts-AI/VideoTranscriber, completely rewritten as a desktop application. License: MIT
39 lines
1.0 KiB
Python
39 lines
1.0 KiB
Python
"""Audio processing endpoint (noise reduction / Studio Sound)."""
|
|
|
|
import logging
|
|
from typing import Optional
|
|
|
|
from fastapi import APIRouter, HTTPException
|
|
from pydantic import BaseModel
|
|
|
|
from services.audio_cleaner import clean_audio, is_deepfilter_available
|
|
|
|
logger = logging.getLogger(__name__)
|
|
router = APIRouter()
|
|
|
|
|
|
class AudioCleanRequest(BaseModel):
|
|
input_path: str
|
|
output_path: Optional[str] = None
|
|
|
|
|
|
@router.post("/audio/clean")
|
|
async def clean_audio_endpoint(req: AudioCleanRequest):
|
|
try:
|
|
output = clean_audio(req.input_path, req.output_path or "")
|
|
return {
|
|
"status": "ok",
|
|
"output_path": output,
|
|
"engine": "deepfilternet" if is_deepfilter_available() else "ffmpeg_anlmdn",
|
|
}
|
|
except Exception as e:
|
|
logger.error(f"Audio cleaning failed: {e}", exc_info=True)
|
|
raise HTTPException(status_code=500, detail=str(e))
|
|
|
|
|
|
@router.get("/audio/capabilities")
|
|
async def audio_capabilities():
|
|
return {
|
|
"deepfilternet_available": is_deepfilter_available(),
|
|
}
|