This commit is contained in:
2025-09-05 21:01:11 +08:00
parent b6afe426d8
commit 851fc17339
7 changed files with 297 additions and 307 deletions

View File

@@ -12,6 +12,9 @@ from urllib.parse import urlencode
from wsgiref.handlers import format_date_time
import websocket
from Config.Config import XF_APPID, XF_APISECRET, XF_APIKEY
class XunFeiAudioEvaluator:
"""讯飞语音评测类"""
@@ -251,9 +254,12 @@ class XunFeiAudioEvaluator:
# 使用示例
if __name__ == '__main__':
# 配置参数
appid = "5b83f8d6"
api_secret = "604fa6cb9c5ab664a0d153fe0ccc6802"
api_key = "5beb887923204000bfcb402046bb05a6"
# appid = "5b83f8d6"
# api_secret = "604fa6cb9c5ab664a0d153fe0ccc6802"
# api_key = "5beb887923204000bfcb402046bb05a6"
appid = XF_APPID
api_secret = XF_APISECRET
api_key = XF_APIKEY
audio_file = "./1.mp3"
# 创建评测器实例