From 61529facc2c5321de9f0ab9123cb1de25bcab62c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 15 Jul 2025 23:28:13 +0300 Subject: feat: remove espeak, add random voice/style selection, fix punctuation in TTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed espeak audio provider completely, now only uses OpenAI TTS - Audio now uses random voice selection by default (can override with --openai-voice) - Added --all-voices flag to generate audio in all 11 OpenAI voices - Images now use random art styles (13 different styles including superhero, yoga, cat-themed) - Fixed TTS to remove punctuation marks before speaking - Updated Bulgarian pronunciation instructions to explicitly avoid Russian accent 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/audio/validate.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 internal/audio/validate.go (limited to 'internal/audio/validate.go') diff --git a/internal/audio/validate.go b/internal/audio/validate.go new file mode 100644 index 0000000..db042bd --- /dev/null +++ b/internal/audio/validate.go @@ -0,0 +1,28 @@ +package audio + +import ( + "fmt" + "strings" + "unicode" +) + +// ValidateBulgarianText validates that the input text contains valid Bulgarian text +func ValidateBulgarianText(text string) error { + if strings.TrimSpace(text) == "" { + return fmt.Errorf("text cannot be empty") + } + + hasCyrillic := false + for _, r := range text { + if unicode.In(r, unicode.Cyrillic) { + hasCyrillic = true + break + } + } + + if !hasCyrillic { + return fmt.Errorf("text must contain Cyrillic characters") + } + + return nil +} \ No newline at end of file -- cgit v1.2.3