Views
No views yet
1git clone https://github.com/AmphionTeam/SpeechJudge.git
2cd SpeechJudge1pip install transformers==4.52.3
2pip install accelerate==1.10.0
3pip install qwen-omni-utils==0.0.8infer/main_btrm.py. Here's a basic example:1from utils import download_hugginface_model
2from btrm_pipeline import RewardModelInferencePipeline
3
4
5if __name__ == "__main__":
6 # Load the model
7 qwen_omni_path = "pretrained/Qwen2.5-Omni-7B"
8 model_path = "pretrained/SpeechJudge-BTRM"
9
10 download_hugginface_model("Qwen/Qwen2.5-Omni-7B", qwen_omni_path)
11 download_hugginface_model("RMSnow/SpeechJudge-BTRM", model_path)
12 inference_pipeline = RewardModelInferencePipeline(qwen_omni_path, model_path)
13
14 # The compared two speeches (and the corresponding text)
15 target_text = "The worn leather, once supple and inviting, now hangs limp and lifeless. Its time has passed, like autumn leaves surrendering to winter's chill. I shall cast it aside, making way for new beginnings and fresh possibilities."
16 wav_path_a = "examples/wav_a.wav"
17 wav_path_b = "examples/wav_b.wav"
18
19 # Compare the two audio outputs
20 score_A, score_B = inference_pipeline.get_pairwise_rewards(
21 target_text, wav_path_a, wav_path_b
22 )
23 final_result = "A" if score_A > score_B else "B" if score_A < score_B else "Tie"
24
25 print(f"\n[Final Result] {final_result}")
26 print(f"Score of Audio A: {score_A}, Score of Audio B: {score_B}")infer/examples/. To run the provided example:1cd infer
2python main_btrm.py1@article{zhang2025speechjudge,
2 title={SpeechJudge: Towards Human-Level Judgment for Speech Naturalness},
3 author={Zhang, Xueyao and Wang, Chaoren and Liao, Huan and Li, Ziniu and Wang, Yuancheng and Wang, Li and Jia, Dongya and Chen, Yuanzhe and Li, Xiulin and Chen, Zhuo and Wu, Zhizheng},
4 journal={arXiv preprint arXiv:2511.07931},
5 year={2025}
6}