Skip to content

Instantly share code, notes, and snippets.

View sjimenez44's full-sized avatar
📍
Focusing

Santiago Jiménez sjimenez44

📍
Focusing
  • Medellín, Colombia
  • 20:23 (UTC -05:00)
  • YouTube @sjimenez044
View GitHub Profile
@sjimenez44
sjimenez44 / remove_silences.py
Created December 1, 2024 16:24
Remove silences with ffmpeg
import re
import subprocess
# Función para ejecutar el comando FFmpeg
def run_ffmpeg(command):
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
return result.stdout.decode(), result.stderr.decode()
# Detectar los silencios en un archivo de audio
def detect_silence(input_file):