chore: bootstrap go module, license, readme and package skeleton

This commit is contained in:
m3ta-chiron committed 2026-10-18 15:14:18 +02:00
1 parent c8f39024e1
commit 24dfe4d46c
11 files changed
+119

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
# Go-Binaries
/talk
/talkd
/talk.exe
/talkd.exe
*.test
*.out
# Release-Artefakte (GoReleaser, Task 11)
/dist/
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 m3tam3re
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+49
View File
@@ -0,0 +1,49 @@
# talk
> **Status: WIP** — aktive Entwicklung (talk 2.0). Binde Spezifikation:
> [`.scratch/talk-2-0/spec.md`](.scratch/talk-2-0/spec.md) ·
> Implementierungsplan: [`.scratch/talk-2-0/plan.md`](.scratch/talk-2-0/plan.md)
**talk** macht Skripte und KI-Agenten hörbar: Ein Aufruf — `talk "Build fertig"` —
spricht eine kurze Nachricht über eine TTS-Provider-Kette
(ElevenLabs → OpenAI → Edge-TTS → OS-Stimme), serialisiert durch den Daemon
`talkd`. Cross-platform (Windows/macOS/Linux, amd64/arm64), statische Binaries,
keine Runtime-Abhängigkeiten.
## Befehle
| Befehl | Zweck |
| --- | --- |
| `talk "Text"` | Ansage — Abkürzung für `talk say`, non-blocking |
| `talk say "Text"` | Ansage (Text als Argument oder von stdin) |
| `talk wrap -- <Befehl>` | Befehl ausführen, Erfolg/Misserfolg + Dauer ansagen |
| `talk mute` / `talk unmute` | Ansagen dauerhaft stummschalten / Stummschaltung aufheben |
| `talk status` | Daemon-Status (Queue, Mute, Provider, Version) |
| `talk cancel` | laufende und geplante Ansagen abbrechen |
| `talk voices` | verfügbare Stimmen anzeigen |
| `talk test` | Test-Ansage ausgeben |
| `talk doctor` | Selbstdiagnose des Setups |
| `talk setup` | geführte Ersteinrichtung (Wizard) |
Say-Flags (gelten auch für `talk "Text"`): `--wait`, `--now`, `--priority`,
`--voice`, `--lang`, `--provider`.
**Hinweis:** Alle Befehle sind in diesem Stand Stubs und melden
`not implemented yet` (Exit-Code ≠ 0). Die Implementierung entsteht
Aufgabenweise gemäß Plan; `--version` und `--help` funktionieren.
## Entwicklung
```console
go build ./... # bauen
go test ./... # Tests
go vet ./... # statische Analyse
gofmt -l . # Formatierung prüfen (leerer Output = ok)
```
CI: `.gitea/workflows/test.yml` (Gitea Actions) läuft vet, gofmt-Check, Tests
und Build bei jedem Push und Pull Request.
## Lizenz
MIT — siehe [LICENSE](LICENSE).
+3
View File
@@ -0,0 +1,3 @@
module code.m3ta.dev/m3tam3re/talk
go 1.26.8
+4
View File
@@ -0,0 +1,4 @@
// Package api implementiert die HTTP-Oberfläche des Daemons auf 127.0.0.1:
// POST /speak, GET /status, POST /cancel, POST /mute, POST /unmute (Task 04),
// CORS für /speak und den MCP-Endpoint (Streamable HTTP, Task 06).
package api
+5
View File
@@ -0,0 +1,5 @@
// Package audio implementiert die Audio-Ausgabe von talk über das
// Sink-Interface: Playback embedded via oto (PCM/WAV) und ein null-Sink,
// das verwirft (CI, Server, Tests). Auswahl per Config audio.sink.
// Implementierung folgt in Task 02.
package audio
+7
View File
@@ -0,0 +1,7 @@
// Package config implementiert die Config-Auflösung von talk: Defaults +
// optionale config.toml im platform-nativen Verzeichnis (~/.config/talk,
// ~/Library/Application Support/talk, %APPDATA%\talk) + Env-Overrides
// (TALK_*); Env schlägt Datei. Enthält Voice-Mapping voice.<provider>.<lang>
// und Provider-Endpunkte (Fake-bar für Tests). Implementierung folgt in
// Task 02.
package config
+4
View File
@@ -0,0 +1,4 @@
// Package langdetect erkennt die Sprache eines Ansage-Texts als reine
// Funktion Detect(text) → "de" | "en" (Default "de"; Heuristik über
// Common-Word-Listen und Umlaute/ß). Implementierung folgt in Task 02.
package langdetect
+4
View File
@@ -0,0 +1,4 @@
// Package notify implementiert Best-effort-Desktop-Notifications parallel
// zum Audio (beeep: notify-send / macOS Notification Center / Windows Toast),
// mit Abbrechen-Button, wo das OS ihn hergibt. Implementierung folgt.
package notify
+6
View File
@@ -0,0 +1,6 @@
// Package provider implementiert die TTS-Provider-Kette von talk:
// ElevenLabs → OpenAI TTS → Edge-TTS → OS built-in (macOS say, Windows SAPI,
// Linux espeak/speech-dispatcher), überschreibbar per Config/Flag, mit
// Fallback bei Fehlern. Implementierung folgt in Task 02 (osbuiltin) und
// Task 03 (Cloud-Provider, Kette).
package provider
+6
View File
@@ -0,0 +1,6 @@
// Package queue implementiert die Ansage-Queue des Daemons: serialisierte
// Abarbeitung (eine Ansage gleichzeitig), Prioritäten (high > normal > low,
// FIFO je Level), now-Items springen vor, Rate-Limit mit prioritätsbewusstem
// Verwerfen. Implementierung folgt in Task 04 (Queue) und Task 05
// (Rate-Limit, Ruhezeiten).
package queue