feat(voice-recognition): add speech recognition and emotion-based video switching
Implement voice recognition functionality that displays transcript in a styled container. Add emotion analysis to switch videos based on detected positive/negative keywords in speech. Includes UI updates for transcript display and microphone interaction.
This commit is contained in:
@@ -125,6 +125,33 @@ html, body {
|
||||
/* 这个区域现在是空的,可以移除或保留以备将来使用 */
|
||||
}
|
||||
|
||||
/* --- 语音识别结果显示 --- */
|
||||
.transcript-container {
|
||||
position: absolute;
|
||||
bottom: 180px; /* 放置在麦克风按钮上方 */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 80%;
|
||||
max-width: 600px;
|
||||
padding: 15px;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease-in-out;
|
||||
pointer-events: none; /* 默认不响应鼠标事件 */
|
||||
}
|
||||
|
||||
.transcript-container.visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#transcript {
|
||||
font-size: 1.2rem;
|
||||
color: #fff;
|
||||
text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
|
||||
}
|
||||
|
||||
/* --- 底部内容 --- */
|
||||
.bottom-bar {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user