| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  | <!DOCTYPE html> | 
					
						
							|  |  |  |  | <html lang="en"> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <head> | 
					
						
							|  |  |  |  |     <meta charset="UTF-8"> | 
					
						
							|  |  |  |  |     <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 
					
						
							|  |  |  |  |     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |     <!-- index.css --> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |     <link rel="stylesheet" href="{{ url_for('static',filename='css/index.css') }}"> | 
					
						
							|  |  |  |  |     </link> | 
					
						
							| 
									
										
										
										
											2023-01-31 12:40:36 +08:00
										 |  |  |  |     <!-- <link rel="stylesheet" href="./css/index.css"> --> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |     <!-- 引入element-ui样式 --> | 
					
						
							| 
									
										
										
										
											2023-01-31 12:40:36 +08:00
										 |  |  |  |     <!-- <link rel="stylesheet" href="./css/element.css"> --> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |     <link rel="stylesheet" href="{{ url_for('static',filename='css/element.css') }}"> | 
					
						
							|  |  |  |  |     </link> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |     <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> | 
					
						
							| 
									
										
										
										
											2023-06-21 17:54:26 +08:00
										 |  |  |  |     <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"> | 
					
						
							| 
									
										
										
										
											2023-02-03 18:46:12 +08:00
										 |  |  |  |     <script src="/static/live2d/autoload.js"></script> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |     <title>Fay</title> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | </head> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | <body> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |     <div id="app"> | 
					
						
							|  |  |  |  |         <div class="main"> | 
					
						
							|  |  |  |  |             <div class="title"> | 
					
						
							|  |  |  |  |                 <h2>Fay数字人助理版</h2> | 
					
						
							|  |  |  |  |             </div> | 
					
						
							|  |  |  |  |             <div class="main_box"> | 
					
						
							|  |  |  |  |                 <div class="left"> | 
					
						
							|  |  |  |  |                     <div class="left_top"> | 
					
						
							|  |  |  |  |                         <p class="left_top_p">人设:</p> | 
					
						
							|  |  |  |  |                         <div class="character"> | 
					
						
							|  |  |  |  |                             <div class="character_top"> | 
					
						
							|  |  |  |  |                                 <div class="character_left"> | 
					
						
							|  |  |  |  |                                     <ul> | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>姓名:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_name" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>性别:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_gender" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>年龄:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_age" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>出生地:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_birth" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>生肖:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_zodiac" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>星座:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_constellation" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>职业:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_job" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>联系方式:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_contact" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							| 
									
										
										
										
											2023-06-21 17:54:26 +08:00
										 |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>喜好:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="attribute_hobby" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                                     </ul> | 
					
						
							|  |  |  |  |                                 </div> | 
					
						
							|  |  |  |  |                                 <div class="character_right"> | 
					
						
							|  |  |  |  |                                     <ul> | 
					
						
							| 
									
										
										
										
											2023-06-21 17:54:26 +08:00
										 |  |  |  |                                         <li style="width: 375px;"> | 
					
						
							|  |  |  |  |                                             <p>Q&A文件:</p> | 
					
						
							|  |  |  |  |                                             <el-input v-model="interact_QnA" placeholder="请输入内容"></el-input> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <br> | 
					
						
							|  |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>使用面板播放:</p> | 
					
						
							|  |  |  |  |                                             <el-switch v-model="play_sound_enabled" active-color="#13ce66" | 
					
						
							|  |  |  |  |                                                 inactive-color="#ff4949"> | 
					
						
							|  |  |  |  |                                             </el-switch> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <br> | 
					
						
							| 
									
										
										
										
											2023-06-14 20:34:36 +08:00
										 |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>声音选择:{{attribute_voice}}</p> | 
					
						
							|  |  |  |  |                                             <el-select v-model="attribute_voice" placeholder="请选择"> | 
					
						
							|  |  |  |  |                                                 <el-option v-for="item in voice_list" :key="item.value" | 
					
						
							|  |  |  |  |                                                     :label="item.label" :value="item.value"> | 
					
						
							|  |  |  |  |                                                 </el-option> | 
					
						
							|  |  |  |  |                                             </el-select> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         <br> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                                         <li> | 
					
						
							|  |  |  |  |                                             <p>敏感度:</p> | 
					
						
							|  |  |  |  |                                             <el-slider v-model="interact_perception_follow"></el-slider> | 
					
						
							|  |  |  |  |                                         </li> | 
					
						
							|  |  |  |  |                                         | 
					
						
							|  |  |  |  |                                         <br> | 
					
						
							| 
									
										
										
										
											2023-06-21 17:54:26 +08:00
										 |  |  |  |                                         <li > | 
					
						
							|  |  |  |  |                                              <el-button style="margin-left: 55px;width: 135px;"  type="success"  class="btn_open" | 
					
						
							|  |  |  |  |                                              @click=postControlEyes()><i class="fas fa-eye"></i> Fay Eyes</el-button> | 
					
						
							| 
									
										
										
										
											2023-05-27 17:03:43 +08:00
										 |  |  |  |                                         </li> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                                     </ul> | 
					
						
							|  |  |  |  |                                 </div> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |                             </div> | 
					
						
							| 
									
										
										
										
											2023-06-21 17:54:26 +08:00
										 |  |  |  |                            | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |                         </div> | 
					
						
							|  |  |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                     <div class="left_box"> | 
					
						
							|  |  |  |  |                         <p> </p> | 
					
						
							|  |  |  |  |                         <div class="source"> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |                             <ul> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                                  | 
					
						
							|  |  |  |  |                                 <li class="url"> | 
					
						
							|  |  |  |  |                                     <el-switch v-model="source_record_enabled" active-color="#13ce66" | 
					
						
							|  |  |  |  |                                         inactive-color="#ff4949"> | 
					
						
							|  |  |  |  |                                     </el-switch> | 
					
						
							|  |  |  |  |                                     <p>麦克风</p> | 
					
						
							|  |  |  |  |                                     <el-select v-model="source_record_device" placeholder="请选择"> | 
					
						
							|  |  |  |  |                                         <el-option v-for="item in device_list" :key="item.value" :label="item.label" | 
					
						
							|  |  |  |  |                                             :value="item.value"> | 
					
						
							|  |  |  |  |                                         </el-option> | 
					
						
							|  |  |  |  |                                     </el-select> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |                                 </li> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                                 <li class="url"> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                                     <p style="margin-left: 40px">消 息</p> | 
					
						
							|  |  |  |  |                                     <el-input v-model="panel_msg" :disabled="true"></el-input> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |                                 </li> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                                 <li class="but"> | 
					
						
							|  |  |  |  |                                     <el-button v-if="live_state == 1" type="success" class="btn_close" | 
					
						
							|  |  |  |  |                                         style="width:200px" @click=postStopLive()>关闭(运行中)</el-button> | 
					
						
							|  |  |  |  |                                     <el-button v-else-if="live_state == 2" type="primary" plain disabled | 
					
						
							|  |  |  |  |                                         style="width:200px">正在开启...</el-button> | 
					
						
							|  |  |  |  |                                     <el-button v-else-if="live_state == 3" type="success" plain disabled | 
					
						
							|  |  |  |  |                                         style="width:200px">正在关闭...</el-button> | 
					
						
							|  |  |  |  |                                     <el-button v-else type="primary" style="width:200px" class="btn_open" | 
					
						
							|  |  |  |  |                                         @click=postStartLive()>开启</el-button> | 
					
						
							|  |  |  |  |                                     <el-button type="button" style="width:200px" @click=postData()>保存配置</el-button> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |                                 </li> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                                 <li class="p_red"> | 
					
						
							|  |  |  |  |                                     <p>注:启动后请选中场景客户端,让其前端运行,否则可能会卡顿,或者无声音。</p> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |                                 </li> | 
					
						
							|  |  |  |  |                             </ul> | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                         </div> | 
					
						
							|  |  |  |  |                     </div> | 
					
						
							|  |  |  |  |                 </div> | 
					
						
							|  |  |  |  |                 <div class="right"> | 
					
						
							|  |  |  |  |                     <div class="right_main"> | 
					
						
							|  |  |  |  |                         <div class="container"> | 
					
						
							|  |  |  |  |                             <div class="content"> | 
					
						
							|  |  |  |  |                         | 
					
						
							|  |  |  |  |                                 <div v-for="item in msg_list"> | 
					
						
							|  |  |  |  |                                 <div class="item item-center"><span>[[item.timetext]]</span></div> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                                 <div class="item item-left" v-if="item.type == 'fay'"> | 
					
						
							|  |  |  |  |                                     <div class="avatar"><img src="{{ url_for('static',filename='to.jpg') }}" /> | 
					
						
							|  |  |  |  |                                     </div> | 
					
						
							|  |  |  |  |                                     <div class="bubble bubble-left">[[item.content]] | 
					
						
							|  |  |  |  |                                     </div> | 
					
						
							|  |  |  |  |                                 </div> | 
					
						
							|  |  |  |  |                                 <div class="item item-right" v-else> | 
					
						
							|  |  |  |  |                                     <div class="bubble bubble-right">[[item.content]]</div> | 
					
						
							|  |  |  |  |                                     <div class="avatar"><img src="{{ url_for('static',filename='from.jpg') }}" /> | 
					
						
							|  |  |  |  |                                     </div> | 
					
						
							|  |  |  |  |                                 </div> | 
					
						
							|  |  |  |  |                             </div> | 
					
						
							|  |  |  |  |                                  | 
					
						
							|  |  |  |  |                            | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                               | 
					
						
							|  |  |  |  |                                | 
					
						
							|  |  |  |  |                             </div> | 
					
						
							|  |  |  |  |                             <div class="input-area"> | 
					
						
							|  |  |  |  |                                 <textarea v-model="send_msg" name="text" id="textarea" placeholder="发送些内容给Fay..."></textarea> | 
					
						
							|  |  |  |  |                                 <div class="button-area"> | 
					
						
							| 
									
										
										
										
											2023-05-27 17:03:43 +08:00
										 |  |  |  |                                     <button id="send-btn" @click="send(1)">Fay</button> | 
					
						
							|  |  |  |  |                                      | 
					
						
							| 
									
										
										
										
											2023-06-21 17:54:26 +08:00
										 |  |  |  |                                     <!-- <button id="send-btn" @click="send(2)" style="margin-left: 25px;">ChatGPT</button> --> | 
					
						
							| 
									
										
										
										
											2023-05-27 17:03:43 +08:00
										 |  |  |  |                                      | 
					
						
							| 
									
										
										
										
											2023-05-12 18:56:36 +08:00
										 |  |  |  |                                 </div> | 
					
						
							|  |  |  |  |                             </div> | 
					
						
							|  |  |  |  |                         </div> | 
					
						
							|  |  |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  |                 </div> | 
					
						
							|  |  |  |  |             </div> | 
					
						
							|  |  |  |  |         </div> | 
					
						
							|  |  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2023-06-14 20:34:36 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  | </body> | 
					
						
							|  |  |  |  | <!-- 开发环境vue.js --> | 
					
						
							| 
									
										
										
										
											2023-01-31 12:40:36 +08:00
										 |  |  |  | <script src="{{ url_for('static',filename='js/vue.js') }}"></script> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  | <!-- 发行环境vue.js --> | 
					
						
							|  |  |  |  | <!-- <script src="https://cdn.jsdelivr.net/npm/vue@2"></script> --> | 
					
						
							|  |  |  |  | <!-- 引入element-ui组件库 --> | 
					
						
							| 
									
										
										
										
											2023-01-31 12:40:36 +08:00
										 |  |  |  | <!-- <script src="./js/element.js"></script> --> | 
					
						
							|  |  |  |  | <script src="{{ url_for('static',filename='js/element.js') }}"></script> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  | <!-- index.js --> | 
					
						
							| 
									
										
										
										
											2023-01-31 12:40:36 +08:00
										 |  |  |  | <!-- <script src="./js/index.js"></script> --> | 
					
						
							|  |  |  |  | <!-- <script src="./js/self-adaption.js"></script> --> | 
					
						
							| 
									
										
										
										
											2022-06-20 11:05:10 +08:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  | <script src="{{ url_for('static',filename='js/index.js') }}"></script> | 
					
						
							|  |  |  |  | <script src="{{ url_for('static',filename='js/self-adaption.js') }}"></script> | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | </html> |