#!/usr/bin/python3 # -*- coding: utf-8 -*- import argparse from gradio_client import Client, file from project_settings import project_path def get_args(): parser = argparse.ArgumentParser() parser.add_argument( "--filename", default=(project_path / "data/test_wavs/paraformer-zh/si_chuan_hua.wav").as_posix(), type=str ) args = parser.parse_args() return args def main(): args = get_args() filename = args.filename client = Client("hf-audio/whisper-large-v3") result = client.predict( inputs=file(filename), task="transcribe", api_name="/predict" ) print(result) return if __name__ == '__main__': main()