Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions src/main.py

This file was deleted.

24 changes: 24 additions & 0 deletions voice-search/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
107 changes: 107 additions & 0 deletions voice-search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
Brisk Speech-to-Text Assessment

Overview

Brisk Speech-to-Text is a React-based web application that allows users to perform voice searches using the Web Speech API. Users can also upload audio files, which are processed to extract text-based search queries. The application provides real-time speech recognition, autocomplete suggestions, and a user-friendly interface for seamless interaction.

Features

🎙 Real-time voice recognition using the Web Speech API

📂 Audio file upload (supports WAV, MP3, etc.) for text extraction

🔍 Smart search suggestions based on partial input

⌨ Supports both voice and text input

🎨 Clean UI with proper spacing and design improvements

🔊 Background noise handling through browser's built-in processing

Tech Stack

Frontend: React, JavaScript, CSS

Icons: Lucide-react

Installation & Setup

Prerequisites

Node.js (Ensure you have it installed)

npm (Comes with Node.js)

Steps

Clone the repository

git clone <repo-url>
cd brisk-speech-to-text-assessment

Install dependencies

npm install

Run the project

npm run dev

Open your browser and go to http://localhost:5173/ (or the port shown in the terminal).

Usage

Start voice recognition by clicking the microphone button.

Speak your search query and watch the real-time transcription.

Upload an audio file to process text from it.

Manually enter text in the search box and get autocomplete suggestions.

Click on a suggestion to autofill the search box.

File Structure

📂 brisk-speech-to-text-assessment
├── 📁 src
│ ├── 📄 index.css (Global styling)
│ ├── 📄 main.jsx (Entry point)
│ ├── 📁 components
│ │ ├── 📄 VoiceSearch.jsx (Main component)
│ ├── 📁 utils
│ │ ├── 📄 mockData.js (Dummy data for autocomplete suggestions)
├── 📄 package.json (Dependencies & scripts)
├── 📄 README.md (You're here!)

Git Commands Used

Create a new branch:

git checkout -b <branch-name>

Push the new branch to remote:

git push -u origin <branch-name>

Troubleshooting

Speech recognition not working?

Make sure you're using Google Chrome (Web Speech API is not supported in some browsers).

Check if microphone access is enabled.

Audio upload failing?

Ensure you upload a valid audio file (MP3, WAV, etc.).

Check console logs for errors.

Future Enhancements

🌐 Multi-language support for speech recognition

📊 Improved AI-based autocomplete suggestions

🖥 Backend support for better audio processing
33 changes: 33 additions & 0 deletions voice-search/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
13 changes: 13 additions & 0 deletions voice-search/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading