Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A buddy for system level voice assistance. I am trying to make it as useful as possible

License

Notifications You must be signed in to change notification settings

Shanwis/Hey-Teddy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hey Teddy : A buddy for system voice assistance

Python Vosk Linux Offline System Control License

This is a project attempting to make an offline voice assistant using the vosk library for voice-to-text parsing. I want to have an extensive selection of commands which can be executed through voice.

Features (of V1)

Teddy can support the following commands:

System control

  • Shutdown
  • Reboot
  • Logout
  • Lock screen

Application control

  • open terminal
  • open browser
  • open VS Code

Window control

  • close active window
    • Works only for xorg/xwayland windows currently

Audio control

  • Mute/Unmute speakers
  • Increase/Decrease volume

Brightness control

  • Increase/Decrease brightness

Network control

  • Turn Wi-Fi on/off
  • Turn bluetooth on/off

Battery status

  • Says the battery level out loud

Working

Wake Word + Offline Speech Recognition

Teddy listens for a wake word using:

Porcupine (Picovoice) — highly accurate wake-word engine

Vosk (vosk-model-small-en-us-0.15) — low-memory offline speech-to-text model ideal for command recognition

No cloud processing. No internet required.

Project structure

Hey-Teddy/
├── models/
│   └── vosk-model-small-en-us-0.15/
├── app
│   ├── commands.py
│   ├── config.py
│   ├── main.py
│   ├── nlu.py
│   ├── recognizer.py
│   └── tts.py
├── assets
│   └── logo.png
├── Requirements
│   ├── linux_requirements.txt
│   └── requirements_python.txt
├── Hey-Teddy.desktop
├── .gitignore
├── LICENSE
└── README.md

Using Hey-Teddy

  1. Clone the repo
git clone https://github.com/<your-username>/Hi-Teddy.git
cd Hi-Teddy
  1. Install dependencies
pip install -r Requirements/Requirements/requirements_python.txt
sudo dnf install wmctrl brightnessctl nmcli
  1. Download Vosk model
Place the following model in the models/ folder:
vosk-model-small-en-us-0.15
  1. Run Teddy
python app/main.py

Installation as a desktop app

I have added a desktop launcher so that it can be run as a regular application

  1. Make the .desktop file executable
chmod +x Hey-Teddy.desktop
  1. Install to system applications menu
cp Hey-Teddy.desktop ~/.local/share/applications/
  1. Update the desktop to see it quick
update-desktop-database ~/.local/share/applications/

Now we can see it as an app.

Why Teddy?

It is quite nice to have a friendly companion in you laptop or desktop. It gives it a certain personality.

Teddy is not meant to compete with online cloud assistants. It is a offline, extendable buddy.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Notes & Limitations

  • Close Window

    close_window only works for Xorg / XWayland windows using wmctrl. Wayland-native apps cannot be closed externally due to GNOME security restrictions.

  • Microphone Must Be Active

    Vosk requires continuous access to the microphone. If the mic is blocked by permissions or another app, Teddy will not hear commands.

About

A buddy for system level voice assistance. I am trying to make it as useful as possible

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages