import gradio as gr import argparse import functools import numpy as np import torch from infer_contrast import run from utils.reader import load_audio from utils.utility import add_arguments, print_arguments STYLE = """ """ OUTPUT_OK = ( STYLE + """
" "💻 Code Repository | " "🎙️ zhvoice Dataset | " "
" ) examples = [ ["samples/李云龙1.wav", "samples/李云龙2.wav"], ["samples/马保国1.wav", "samples/马保国2.wav"], ["samples/周杰伦1.wav", "samples/周杰伦2.wav"], ["samples/海绵宝宝1.wav", "samples/派大星.wav"], ["samples/海绵宝宝1.wav", "samples/海绵宝宝2.wav"], ["samples/周星驰.wav", "samples/吴孟达.wav"]] interface = gr.Interface( fn=voiceRecognition, inputs=inputs, outputs=output, title=title, description=description, examples=examples, examples_per_page=3, article=article, enable_queue=True) interface.launch(debug=True,share=True)