bitirme-proje / app.py
Bedirhan's picture
Update app.py
552f60d
raw
history blame contribute delete
557 Bytes
import gradio as gr
from moviepy.editor import AudioFileClip
from pydub import AudioSegment
def video_input(video):
ext="wav"
print(video)
save_path='sounds/isim'
AudioFileClip(video).write_audiofile(f"{save_path}.{ext}",codec='pcm_s32le')
# cv=convertWav(video).beginn()
sound = AudioSegment.from_wav(save_path + '.' + ext)
sound = sound.set_channels(1)
sound.export(save_path + '.' + ext, format="wav")
iface = gr.Interface(
video_input,
gr.inputs.Video(source="upload"),
"playable_video",
)
iface.launch()