summaryrefslogtreecommitdiff
path: root/internal/audio/validate.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-15 23:28:13 +0300
committerPaul Buetow <paul@buetow.org>2025-07-15 23:28:13 +0300
commit61529facc2c5321de9f0ab9123cb1de25bcab62c (patch)
tree0768d5d5e68c71ea52fc31ca2d33950c93977314 /internal/audio/validate.go
parent9c77f2a7bef485fa137f123cbf55b42cacb2b285 (diff)
feat: remove espeak, add random voice/style selection, fix punctuation in TTS
- 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 <noreply@anthropic.com>
Diffstat (limited to 'internal/audio/validate.go')
-rw-r--r--internal/audio/validate.go28
1 files changed, 28 insertions, 0 deletions
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