DiamondYin commited on
Commit
0cb62e5
·
1 Parent(s): 0ec4b60
Files changed (2) hide show
  1. app.py +1 -1
  2. app_utils.py +1 -1
app.py CHANGED
@@ -103,7 +103,7 @@ def get_response(history, audio_input):
103
 
104
  # buzz_usr_proc = Thread(target=idle_timer)
105
 
106
- with gr.Blocks(css = """#col_image{width:100%; height:100%; margin-left: auto; margin-right: auto;}""") as demo:
107
  with gr.Column():
108
  output_html = gr.HTML(label="Felix's Voice", value=AUDIO_HTML)
109
  output_html.visible = False
 
103
 
104
  # buzz_usr_proc = Thread(target=idle_timer)
105
 
106
+ with gr.Blocks(css = """#col_image{width:800px; height:500px; margin-left: auto; margin-right: auto;}""") as demo:
107
  with gr.Column():
108
  output_html = gr.HTML(label="Felix's Voice", value=AUDIO_HTML)
109
  output_html.visible = False
app_utils.py CHANGED
@@ -51,7 +51,7 @@ def initialize_knowledge_base():
51
  search_kwargs={"k": 1}
52
  )
53
  )
54
- voice_model = whisper.load_model("tiny")
55
 
56
  return conv_model, voice_model
57
 
 
51
  search_kwargs={"k": 1}
52
  )
53
  )
54
+ voice_model = whisper.load_model("tiny") #加载模型 tiny模型 tiny模型是一个小型的语音识别模型,它的大小只有 50MB 左右,但是它的准确率却非常高,可以达到 95% 以上。
55
 
56
  return conv_model, voice_model
57