From 30d8d7a5d3ba4efd6e578db3bce321f7926ec516 Mon Sep 17 00:00:00 2001
From: Yabin Li <wucong.lyb@alibaba-inc.com>
Date: 星期一, 25 九月 2023 15:22:05 +0800
Subject: [PATCH] Update SDK_advanced_guide_online_zh.md

---
 funasr/runtime/html5/static/wsconnecter.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/funasr/runtime/html5/static/wsconnecter.js b/funasr/runtime/html5/static/wsconnecter.js
index 4beec83..ee0bcca 100644
--- a/funasr/runtime/html5/static/wsconnecter.js
+++ b/funasr/runtime/html5/static/wsconnecter.js
@@ -77,6 +77,16 @@
 		if(isfilemode)
 		{
 			request.wav_format=file_ext;
+			if(file_ext=="wav")
+			{
+				request.wav_format="PCM";
+				request.audio_fs=file_sample_rate;
+			}
+		}
+		var hotwords=getHotwords();
+		if(hotwords.length>0)
+		{
+			request.hotwords=hotwords;
 		}
 		console.log(request);
 		speechSokt.send( JSON.stringify(request) );

--
Gitblit v1.9.1