Skip to content

AutARK-Research-Project/SmartHeadphonesANCController

Repository files navigation

📌 SmartHeadphonesANCController

This project aims to assist autistic people in office environments, where coworkers and other sources of audible sources of distraction are present by automatically controlling ANC of headphones via wake words and creating adaptive masking noise.


📖 Table of Contents


🔍 Overview

Detailed description of the project:

  • Context: This project is a simplified fork of OpenFreebuds by melianmiko. While the original project provides a full desktop interface for controlling Huawei FreeBuds devices, this repository extracts and adapts the core functionality to run as a lightweight background process.

    The controller was developed as a supporting component of the SmartHeadphones research prototype, which explores assistive technologies for sensory regulation and communication in shared environments.

  • Goal: The goal of this project is to provide a minimal headphone control service that can programmatically manage features such as Active Noise Cancellation (ANC) without requiring a full desktop UI. The controller can be compiled into a standalone executable and integrated into other applications that need to control supported headphones.

  • Target Audience: This repository is intended for:

    • Developers integrating programmatic headphone control into applications
    • Researchers building assistive or context-aware audio systems
    • Contributors interested in extending support for additional headphones or protocols

Core Concept

This project transforms the original desktop headphone control application into a modular control backend.

Instead of providing a user interface, the controller runs as a background process responsible for communicating with supported Bluetooth headphones and exposing a simplified interface for controlling device features.

The main architectural changes compared to the original project include:

  • Removal of the graphical desktop interface
  • Refactoring into a lightweight control service
  • Support for additional headphone models with differing command protocols
  • Packaging as a standalone executable that can be launched and managed by external applications

Within the SmartHeadphones system, this controller acts as the hardware interaction layer, enabling the main application to dynamically manage noise cancellation and listening modes.


✨ Features

  • Active Noise Cancellation Control Enable, disable, or switch ANC modes programmatically.

  • Background Service Architecture Runs as a lightweight process without a graphical user interface.

  • Extended Device Support Adds experimental support for selected Jabra headphones, which use a different command structure than Huawei FreeBuds.

  • Executable Integration Can be compiled into a standalone executable and launched by external applications such as SmartHeadphones.

  • 🔄 Protocol Extension The architecture allows adding support for additional headphone models and command sets.


💻 Installation

Prerequisites

  • Python 3.13+

Quick Start

# Clone the repository
git clone https://github.com/AutARK-Research-Project/SmartHeadphones-Huawei-Driver
cd SmartHeadphones-Huawei-Driver

# Create virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# or: .venv\Scripts\activate  # Windows

# Install dependencies
pip install -r requirements.txt
pip install -r requirements-windows.txt
pip install -r requirements-dev.txt

# Run the application
python server.py

🚀 Usage

Basic Usage

python server.py

📁 Project Structure

SmartHeadphones-Huawei-Driver/
├── 📁build
├── 📁docs
├── 📁openfreebuds
|   ├── 📁driver
|   |   ├── 📁generic
|   |   ├── 📁huawei
|   |   |   ├── 📁driver
|   |   |   └── 📁handler
|   |   └── 📁jabra
|   |       ├── 📁driver
|   |       └── 📁handler
|   ├── 📁manager
|   ├── 📁utils
|   ├── main.py
|   └── webserver.py
├── 📁openfreebuds_backend
|   ├── 📁config
|   ├── 📁linux
|   └── 📁windows
├── LICENSE
├── README.md
├── requirements-dev.txt
├── requirements-linux.txt
├── requirements-windows.txt
├── requirements.txt
└── server.py

🛠️ Development

Setting Up the Development Environment

# Install dependencies
pip install -r requirements.txt
pip install -r requirements-windows.txt
pip install -r requirements-dev.txt

Code Style

We use Black for Python formatting:

black app/

Contributing

Contributions are welcome! Please note:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add: New feature')
  4. Push the branch (git push origin feature/new-feature)
  5. Open a Pull Request

⚠️ Known Limitations

  • Tested on: Windows 11

👥 Team & Contact

Developed by:

Research Group:
AutARK
Chair of Human-Computer Interaction Faculty of Computer Science Dresden University of Technology

Contact:
📧 autark@tu-dresden.de


Created as part of the AutARK research project

About

ANC Control of Huawei Freebuds and select Jabra bluetooth headphones

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors