Skip to main content

Universal STT/TTS Shell Wrapper

Project description

🎙️ stts - Universal Voice Shell

STT + TTS shell wrapper - uruchamiaj dowolne komendy głosem!

# Python version
./stts                    # Voice shell
./stts make build         # Komenda z głosowym output
./stts --setup            # Konfiguracja

# Node.js version (alternatywa)
./stts.mjs                # Voice shell
./stts.mjs make build     # Komenda z głosowym output

✨ Funkcje

  • Auto-detekcja sprzętu - sprawdza RAM, GPU, CPU i rekomenduje odpowiedni model
  • Wybór STT - whisper.cpp, faster-whisper, vosk, Google Speech
  • Wybór TTS - espeak, piper (neural), system TTS
  • Auto-pobieranie - modele pobierane automatycznie
  • Cross-platform - Linux, macOS, Windows, Raspberry Pi
  • Zero konfiguracji - interaktywny setup przy pierwszym uruchomieniu

🚀 Instalacja

# 1. Pobierz
git clone https://github.com/wronai/stts
cd stts

# 2. Uruchom (wybierz wersję)
./stts           # Python 3.8+
./stts.mjs       # Node.js 18+

# 3. Opcjonalnie: zainstaluj globalnie
sudo ln -s $(pwd)/stts /usr/local/bin/stts
sudo ln -s $(pwd)/stts.mjs /usr/local/bin/stts-node

🔄 Python vs Node.js

Cecha Python (stts) Node.js (stts.mjs)
Wymagania Python 3.8+ Node.js 18+
Windows ✅ Pełne ⚠️ Częściowe
Linux/macOS
Rozmiar 25 KB 20 KB
Zależności 0 (stdlib) 0 (stdlib)

Zależności systemowe

# Linux (Ubuntu/Debian)
sudo apt install espeak alsa-utils sox

# macOS
brew install espeak sox

# Windows
# Python + espeak (lub użyj system TTS)

📊 Wymagania sprzętowe

STT (Speech-to-Text)

Provider Min RAM GPU Offline Jakość Szybkość
whisper.cpp 1 GB ⭐⭐⭐⭐ ⭐⭐⭐
faster-whisper 2 GB ✅ (opt) ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐
vosk 0.5 GB ⭐⭐⭐ ⭐⭐⭐⭐⭐
google 0.5 GB ⭐⭐⭐⭐ ⭐⭐⭐

Modele Whisper

Model RAM VRAM Rozmiar Jakość
tiny 1 GB - 75 MB ⭐⭐
base 1 GB - 150 MB ⭐⭐⭐
small 2 GB - 500 MB ⭐⭐⭐⭐
medium 4 GB 2 GB 1.5 GB ⭐⭐⭐⭐⭐
large 8 GB 4 GB 3 GB ⭐⭐⭐⭐⭐

TTS (Text-to-Speech)

Provider Min RAM Jakość Offline
espeak 0.1 GB ⭐⭐
piper 0.5 GB ⭐⭐⭐⭐⭐
system - ⭐⭐⭐

💻 Użycie

Voice Shell (interaktywny)

./stts

🔊 stts> make build       # wpisz komendę
🔊 stts>                  # ENTER = nagrywanie głosu
🔊 stts> exit             # wyjście

Command Wrapper

# Uruchom komendę z głosowym output
./stts make build
./stts python script.py
./stts kubectl get pods
./stts git status

# Ostatnia linijka output zostanie przeczytana na głos

Makefile Integration

# Dodaj do Makefile
%_voice:
	./stts make $*

# Użycie:
# make build_voice
# make test_voice

⚙️ Konfiguracja

# Interaktywny setup
./stts --setup

# Konfiguracja zapisywana w:
~/.config/stts/config.json

Przykładowa konfiguracja

{
  "stt_provider": "whisper_cpp",
  "stt_model": "small",
  "tts_provider": "piper",
  "tts_voice": "pl",
  "language": "pl",
  "timeout": 5,
  "auto_tts": true
}

🔧 Providery

STT: whisper.cpp (rekomendowany)

# Auto-instalacja przy setup
# Lub ręcznie:
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp && make

STT: faster-whisper (GPU)

pip install faster-whisper

STT: vosk (lekki, RPi)

pip install vosk

TTS: piper (neural, rekomendowany)

# Auto-pobieranie przy setup
# Głosy: pl_PL-gosia-medium, en_US-lessac-medium

TTS: espeak (fallback)

sudo apt install espeak

🍓 Raspberry Pi

Dla RPi rekomendowane:

  • STT: vosk (small-pl) lub whisper.cpp (tiny)
  • TTS: espeak lub piper
# RPi setup
sudo apt install espeak alsa-utils
./stts --setup
# Wybierz: vosk + espeak

🐛 Troubleshooting

Brak mikrofonu

# Sprawdź
arecord -l

# Zainstaluj
sudo apt install alsa-utils

Brak dźwięku TTS

# Test espeak
espeak "test"

# Zainstaluj
sudo apt install espeak

Model nie pobiera się

# Ręczne pobranie whisper
wget https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin
mv ggml-small.bin ~/.config/stts/models/whisper.cpp/

📁 Struktura

stts/
├── stts                 # Python version
├── stts.mjs             # Node.js version
├── Makefile             # Make integration
└── README.md

~/.config/stts/
├── config.json          # Konfiguracja (wspólna)
├── history              # Historia komend
└── models/
    ├── whisper.cpp/     # Modele whisper
    │   ├── main         # Binary
    │   └── ggml-*.bin   # Modele
    ├── piper/           # Piper TTS
    │   └── voices/      # Głosy
    └── vosk/            # Modele vosk

📜 Licencja

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stts-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stts-0.1.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file stts-0.1.0.tar.gz.

File metadata

  • Download URL: stts-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for stts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3b22125022c2ccfa3a111f35e780a4b92fa542a6914160f08f967a0d03bf0b79
MD5 32f9ddccc6535a2720c0da99cd01383d
BLAKE2b-256 072b124ce825fed4ddc7b86541c2c795568d82cf1000fb861fe62897e6e5482b

See more details on using hashes here.

File details

Details for the file stts-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for stts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2c47798b384c586b0c488543bcd74f7226cb793f35fdc6237754dd7d77ba27
MD5 c34a50977dd25039b46f068fc6ef50dc
BLAKE2b-256 dd9e0e6c682311b9a47189f19198a64cf8f1ea4d4ed53415d7a6c9c7fc9fb007

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page