Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ Aniquen Server

Python FastAPI ONNX WebSocket AI Status

Aniquen Server is the backend inference engine powering the Aniquen Voice Assistant.

Instead of running heavy AI models directly on the client device, this server performs all machine learning inference using ONNX Runtime, processes live microphone audio through WebSockets, detects the "Hey Aniquen" wake word in real time, and securely proxies speech recognition and LLM requests without exposing API keys.

The architecture is designed for low-latency voice interaction while keeping client devices lightweight.


πŸ“‘ Table of Contents

  • Features
  • Architecture
  • Screenshots
  • Technologies
  • Project Structure
  • How It Works
  • Installation
  • API Endpoints
  • Future Improvements
  • Contributing
  • License
  • Author

✨ Features

βœ… Real-Time Wake Word Detection

βœ… ONNX Runtime AI Inference

βœ… FastAPI Backend

βœ… Low-Latency WebSocket Streaming

βœ… Voice Activity Detection (VAD)

βœ… Automatic Audio Gain Normalization

βœ… Mel Spectrogram Generation

βœ… Embedding Model Pipeline

βœ… Keyword Spotting Model

βœ… Rolling Probability Detection

βœ… Secure Whisper API Proxy

βœ… Secure Groq LLM Proxy

βœ… Environment Variable API Keys

βœ… Lightweight Client Architecture

βœ… Optimized for Always-On Servers


πŸ— System Architecture

Microphone
      β”‚
      β–Ό
Browser
      β”‚
WebSocket
      β”‚
      β–Ό
FastAPI Server
      β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β–Ί Audio Buffer
      β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β–Ί Gain Normalization
      β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β–Ί Voice Activity Detection
      β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β–Ί Mel Spectrogram Model
      β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β–Ί Embedding Model
      β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β–Ί Wake Word Model
      β”‚
      β–Ό
Wake Probability
      β”‚
      β–Ό
Detection Result

βš™ Technologies Used

  • Python 3.12
  • FastAPI
  • Uvicorn
  • ONNX Runtime
  • NumPy
  • WebSockets
  • HTTPX
  • Python Multipart

AI Models

  • Mel Spectrogram ONNX
  • Embedding Model ONNX
  • Hey Aniquen Wake Word Model

Cloud APIs

  • Groq Whisper
  • Groq LLM

πŸ“‚ Project Structure

aniquen-server/
β”‚
β”œβ”€β”€ server.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .python-version
β”œβ”€β”€ embedding_model.onnx
β”œβ”€β”€ melspectrogram.onnx
β”œβ”€β”€ hey_Aniquen.onnx
β”‚
β”œβ”€β”€ firmware/
β”‚
└── README.md

⚑ How It Works

Step 1

The browser records microphone audio.

↓

Step 2

Raw Float32 PCM audio is streamed to the FastAPI server using WebSockets.

↓

Step 3

Incoming audio is buffered and normalized.

↓

Step 4

Voice Activity Detection determines whether speech is present.

↓

Step 5

The Mel Spectrogram ONNX model converts audio into spectrogram features.

↓

Step 6

The Embedding Model generates feature embeddings.

↓

Step 7

The Wake Word Model predicts the probability of the "Hey Aniquen" keyword.

↓

Step 8

The server sends detection results back to the client in real time.

↓

Step 9

When activated, speech transcription and AI chat requests are securely proxied through the backend.


🌐 API Endpoints

WebSocket

/ws

Streams microphone audio and returns wake-word probabilities.


Speech Transcription

POST /api/transcribe

Proxies audio to Groq Whisper while keeping API keys secure.


AI Chat

POST /api/chat

Proxies LLM requests to Groq without exposing credentials.


πŸš€ Installation

Clone the repository

git clone https://github.com/dhruvpandit46/aniquen-server.git

Go inside the project

cd aniquen-server

Install dependencies

pip install -r requirements.txt

Run

uvicorn server:app --host 0.0.0.0 --port 8000

πŸ” Environment Variables

GROQ_WHISPER_KEY=your_key_here

GROQ_LLM_KEY=your_key_here

Never commit API keys to the repository.


🎯 Future Improvements

  • GPU acceleration
  • Multi-language wake words
  • Speaker identification
  • Noise suppression
  • Echo cancellation
  • Multi-device synchronization
  • Streaming speech recognition
  • Docker deployment
  • Kubernetes support
  • Authentication
  • Rate limiting
  • Monitoring dashboard

🀝 Contributing

Contributions are welcome.

  1. Fork the repository

  2. Create your feature branch

  3. Commit your changes

  4. Push your branch

  5. Open a Pull Request


πŸ“œ License

Licensed under the MIT License.

MIT Β© 2026 Dhruv Pandit.

See the LICENSE file for full license details.


πŸ‘¨β€πŸ’» Author

Dhruv Pandit

GitHub

https://github.com/dhruvpandit46

LinkedIn

https://linkedin.com/in/dhruv-pandit-755786326

Instagram

https://instagram.com/dhruv_pandit2007


🌌 Aniquen Ecosystem

Repository Description
πŸ€– Aniquen AI Voice Assistant
🧠 aniquen-server AI Backend & Wake Word Server
🎀 Anique AI Voice Text-to-Speech API
πŸ’¬ Anique AI Browser-Based AI Chatbot
🎬 Anique Multimedia Platform

⭐ Support

If you found this project useful,

please consider giving it a ⭐ on GitHub.

It helps support future development.

About

Server-side AI inference engine for Aniquen. Built with FastAPI, ONNX Runtime and WebSockets for real-time wake-word detection, speech transcription and AI chat while keeping API keys secure on the server.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages