Spaces:
Running
on
Zero
Running
on
Zero
File size: 776 Bytes
f30c373 7c9216a 18e78ec ba685bf 1c57ed2 1429210 2129f6b 1429210 2129f6b 1429210 2129f6b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import gradio as gr
import os
import torch
import io
from pyannote.audio import Pipeline
from pyannote.audio import Audio
from pyannote.audio.pipelines.utils.hook import TimingHook
from pyannote.core import Segment
pipeline = Pipeline.from_pretrained(
"pyannote/speaker-diarization-3.1",
use_auth_token=os.environ['api'])
#def process_audio(audio):
# Your audio processing logic goes here
# For demonstration purposes, we'll just return the input audio
return audio
#with gr.Blocks() as demo:
audio_input = gr.Audio(label="Upload Audio", source="upload")
process_button = gr.Button("Process")
audio_output = gr.Audio(label="Processed Audio")
process_button.click(fn=process_audio, inputs=audio_input, outputs=audio_output)
demo.launch()
|