feat: use new ui bubbletea

This commit is contained in:
leonardotrapani
2026-02-01 20:40:17 +01:00
parent 3ae86f7bae
commit 0b0e084155
25 changed files with 2249 additions and 1934 deletions
+3 -2
View File
@@ -230,8 +230,9 @@ func (a *DeepgramAdapter) buildURL() (string, error) {
q.Set("punctuate", "true")
// add language if specified
if a.language != "" {
q.Set("language", a.language)
lang := normalizeDeepgramLanguage(a.language)
if lang != "" {
q.Set("language", lang)
}
if len(a.keywords) > 0 {
@@ -118,8 +118,9 @@ func (a *DeepgramBatchAdapter) buildURL() (string, error) {
q.Set("punctuate", "true")
// add language if specified
if a.language != "" {
q.Set("language", a.language)
lang := normalizeDeepgramLanguage(a.language)
if lang != "" {
q.Set("language", lang)
}
if len(a.keywords) > 0 {
+15
View File
@@ -0,0 +1,15 @@
package transcriber
import "strings"
func normalizeDeepgramLanguage(code string) string {
if code == "" {
return ""
}
if strings.EqualFold(code, "en") || strings.EqualFold(code, "en-us") || strings.EqualFold(code, "en_us") {
return "en-US"
}
return code
}