From 5791468056a7b62b4b6f00b55974d33fa7f634e9 Mon Sep 17 00:00:00 2001 From: Diya Baweja <124448340+Diya050@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:11:18 +0530 Subject: [PATCH] Voice-To-Text Feature in Chat Bot Overview: Implemented a Voice-to-Text feature using the Web Speech API to improve user accessibility and interaction within the Ambulance App. Added a microphone icon/button that allows users to input their location and medical information via speech. Integrated real-time transcription to fill input fields automatically, enabling users to provide details hands-free. This enhancement facilitates quicker and more efficient communication for patients and caregivers, especially in emergency situations where typing may be challenging. --- chatbot.html | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/chatbot.html b/chatbot.html index 77aa4bd0..a1758120 100644 --- a/chatbot.html +++ b/chatbot.html @@ -18,6 +18,7 @@ rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/a11y-dark.min.css" /> + @@ -67,6 +68,11 @@ placeholder="Type your prompt here..." aria-label="Message input" /> + + @@ -128,6 +135,44 @@ float: left; clear: both; } + + #microphone-animation { + display: none; /* Hide initially */ + align-items: center; + justify-content: center; + margin-left: 10px; /* Adjust as needed */ + } + + .dot { + height: 5px; /* Size of the dots */ + width: 5px; + margin: 0 3px; /* Space between dots */ + background-color: #007bff; /* Color of the dots */ + border-radius: 50%; /* Make it circular */ + animation: bounce 0.6s infinite alternate; /* Animation */ + } + + .dot:nth-child(1) { + animation-delay: 0s; + } + + .dot:nth-child(2) { + animation-delay: 0.2s; + } + + .dot:nth-child(3) { + animation-delay: 0.4s; + } + + @keyframes bounce { + 0% { + transform: translateY(0); + } + 100% { + transform: translateY(-10px); /* Distance to bounce */ + } + } + + - \ No newline at end of file +