Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Website
Tasks
HuggingChat
Collections
Languages
Organizations
Community
Blog
Posts
Daily Papers
Hardware
Learn
Discord
Forum
GitHub
Solutions
Team & Enterprise
Hugging Face PRO
Enterprise Support
Inference Providers
Inference Endpoints
Storage Buckets
Log In
Sign Up
Spaces:
basyx
/
Whisper
like
0
Running
App
Files
Files
Community
1
Fetching metadata from the HF Docker repository...
refs/pr/1
Whisper
/
utils
/
ffmpeg.py
basyx
Update utils/ffmpeg.py
a187bae
verified
4 months ago
Raw
Download with hf CLI
Copy download link
History
Blame
Safe
263 Bytes
import
subprocess
def
extract_audio
(
video, audio
):
cmd = [
"ffmpeg"
,
"-y"
,
"-i"
, video,
"-vn"
,
"-acodec"
,
"pcm_s16le"
,
"-ar"
,
"16000"
,
"-ac"
,
"1"
,
audio
]
subprocess.run(cmd, check=
True
)