Skip to content

Commit

Permalink
Merge pull request #352 from bliteknight/main
Browse files Browse the repository at this point in the history
Some UI Tweaks and Dutch Language Support
  • Loading branch information
kercre123 authored Jun 28, 2024
2 parents bf238c2 + 9220e49 commit 0dafb3c
Show file tree
Hide file tree
Showing 8 changed files with 316 additions and 42 deletions.
266 changes: 266 additions & 0 deletions chipper/intent-data/nt-NL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
[
{
"name" : "intent_names_username_extend",
"keyphrases": ["Mijn naam is", "naam is", "bijnaam is", "mijn maan is", "Mijn baan is" ],
"requiresexact": false
},
{
"name": "intent_weather_extend",
"keyphrases" : ["weer", "meer", "keer", "het weer", "weerbericht", "hoe is het weer", "hoe is het meer", "het keer" ],
"requiresexact": false
},
{
"name": "intent_names_ask",
"keyphrases" : ["mijn naam", "wat is mijn naam", "watts mijn naam", "mijn maan"],
"requiresexact": false
},
{
"name": "intent_imperative_eyecolor",
"keyphrases" : ["ogen", "oogkleur", "boven", "maak je ogen", "boog", "boogkleur", "verander oogkleur naar", "oog meur"],
"requiresexact": false
},
{
"name": "intent_character_age",
"keyphrases" : ["hoe oud", "hoe oud ben jij", "roe oud ben jij", "wat is je leeftijd", "wat is jouw leefijd", "hoe oud ben je"],
"requiresexact": false
},
{
"name": "intent_explore_start",
"keyphrases" : ["ontdek", "ga ontdekken", "onttrek"],
"requiresexact": false
},
{
"name": "intent_system_charger",
"keyphrases" : ["laad op", "huis", "ga naar", "muis", "ga naar je lader", "ga laden" ],
"requiresexact": false
},
{
"name": "intent_system_sleep",
"keyphrases" : ["slaap", "ga slapen", "schaap", "ga schapen" ],
"requiresexact": false
},
{
"name": "intent_greeting_goodmorning",
"keyphrases" : ["morgen", "morge", "goede morgen", "middag", "goede middag" ],
"requiresexact": false
},
{
"name": "intent_greeting_goodnight",
"keyphrases" : ["avond", "almond", "fijne avond","goede avond" ],
"requiresexact": false
},
{
"name": "intent_greeting_goodbye",
"keyphrases" : ["doei", "doeidoei", "bye", "groei" ],
"requiresexact": false
},
{
"name": "intent_seasonal_happynewyear",
"keyphrases" : ["vuurwerk", "gelukkig nieuw jaar", "gelukkig nieuw waar", "vuur sterk", "nieuwe jaar" ],
"requiresexact": false
},
{
"name": "intent_seasonal_happyholidays",
"keyphrases" : ["feestdagen", "kerst", "fijne feestagen", "fijne kerst", "fijne kerstmis", "beestdagen" ],
"requiresexact": false
},
{
"name": "intent_amazon_signin",
"keyphrases" : ["log in bij alexa", "bij alexa", "", "ing alex", "in bij alexa", "naar alexa", "in angelica" ],
"requiresexact": false
},
{
"name": "intent_amazon_signin",
"keyphrases" : ["in outlet", "i now of elea", "out alexa", "out of ale" ],
"requiresexact": false
},
{
"name": "intent_imperative_forward",
"keyphrases" : ["voren", "naar voren", "rol naar voren", "boren", "ga naar boren", "storen","ga naar storen" ],
"requiresexact": false
},
{
"name": "intent_imperative_turnaround",
"keyphrases" : ["keer om", "slalom", "draai om", "maai om", "meer om" ],
"requiresexact": false
},
{
"name": "intent_imperative_turnleft",
"keyphrases" : ["ga links", "ga naar links", "draai naar links", "draai links" ],
"requiresexact": false
},
{
"name": "intent_imperative_turnright",
"keyphrases" : ["ga rechts", "rechts", "ga rechst" ],
"requiresexact": false
},
{
"name": "intent_play_rollcube",
"keyphrases" : ["rol je kubus", "ro je kubus", "wo je kubus", "rol kubus", "wo kubus" ],
"requiresexact": false
},
{
"name": "intent_play_popawheelie",
"keyphrases" : ["pop een wheele", "popawhele", "wele", "pop a wiele", "wielstand", "do a flip", "weerstand", "pop een wie", "poppen wie"],
"requiresexact": false
},
{
"name": "intent_play_fistbump",
"keyphrases" : ["box", "mox", "geef een box", "boks", "stots", "roks", "cocks", "vox" ],
"requiresexact": false
},
{
"name": "intent_play_blackjack",
"keyphrases" : ["black", "kaarten", "game", "speel blackjack", "eenentwintigen", "eendentwintigen" ],
"requiresexact": false
},
{
"name": "intent_imperative_affirmative",
"keyphrases" : ["ja", "klopt", "tuurlijk", "graag", "ja graag" ],
"requiresexact": false
},
{
"name": "intent_imperative_negative",
"keyphrases" : ["nee", "niet", "nee bedankt", "slee"],
"requiresexact": true
},
{
"name": "intent_photo_take_extend",
"keyphrases" : ["photo", "foto", "selfy", "fotografeer", "grafeer", "maak een foto" ],
"requiresexact": false
},
{
"name": "intent_imperative_praise",
"keyphrases" : ["goed", "super", "goede robot", "goed robot", "stoep robot" ],
"requiresexact": false
},
{
"name": "intent_imperative_abuse",
"keyphrases" : ["slecht", "stom", "slechte robot", "stomme robot", "haat", "dom" ],
"requiresexact": false
},
{
"name": "intent_imperative_apologize",
"keyphrases" : ["sorry", "spijt me", "oops", "laat maar" ],
"requiresexact": false
},
{
"name": "intent_imperative_backup",
"keyphrases" : ["back", "back up", "backwards","beck"],
"requiresexact": false
},
{
"name": "intent_imperative_volumedown",
"keyphrases" : ["geluid omlaag", "zachter", "zet zechter", "zet het geluid zachter", "wachter" ],
"requiresexact": false
},
{
"name": "intent_imperative_volumeup",
"keyphrases" : ["harder", "luider", "zet harder", "zet het geluid harder", "harrer" ],
"requiresexact": false
},
{
"name": "intent_imperative_lookatme",
"keyphrases" : ["kijk naar me", "naar me", "kijk" ],
"requiresexact": false
},
{
"name": "intent_imperative_volumelevel_extend",
"keyphrases" : ["luidst", "hardst" ],
"requiresexact": false
},
{
"name": "intent_imperative_shutup",
"keyphrases" : ["shut up", "hou op" ],
"requiresexact": false
},
{
"name": "intent_greeting_hello",
"keyphrases" : ["hallo", "hoi", "halo" ],
"requiresexact": false
},
{
"name": "intent_imperative_come",
"keyphrases" : ["kom hier", "kom naar mij toe", "kom mier" ],
"requiresexact": false
},
{
"name": "intent_imperative_love",
"keyphrases" : ["hou van je", "dove you", "i love you" ],
"requiresexact": false
},
{
"name": "intent_knowledge_promptquestion",
"keyphrases" : ["vraag", "ik heb een vraag", "waag", "ik heb een waag" ],
"requiresexact": false
},
{
"name": "intent_clock_checktimer",
"keyphrases" : ["check timer", "check de timer" ],
"requiresexact": false
},
{
"name": "intent_global_stop_extend",
"keyphrases" : ["stop timer", "stop de timer", "stop klok", "stoppen timer", "stop het alarm", "stop alarm" ],
"requiresexact": false
},
{
"name": "intent_clock_settimer_extend",
"keyphrases" : ["timer", "timer van", "alarm van", "zet alarm", "zet een timer van", "zet een alarm van" ],
"requiresexact": false
},
{
"name": "intent_clock_time",
"keyphrases" : ["hoe laat is het", "tijd", "wat is de tijd", "klok" ],
"requiresexact": false
},
{
"name": "intent_imperative_quiet",
"keyphrases" : ["still", "hou je bek", "doe stil" ],
"requiresexact": false
},
{
"name": "intent_imperative_dance",
"keyphrases" : ["dans", "trans", "luister naar de muziek", "dans op de beat", "publiek", "luister naar pibliek", "naar de muziek" ],
"requiresexact": false
},
{
"name": "intent_play_pickupcube",
"keyphrases" : ["pak op", "pak je kubus" ],
"requiresexact": false
},
{
"name": "intent_imperative_fetchcube",
"keyphrases" : ["breng je kubus naar mij", "haal je kubus op", "maal je kubus", "streng je kubus" ],
"requiresexact": false
},
{
"name": "intent_imperative_findcube",
"keyphrases" : ["vind je kubus", "vind kubus", "je kubus" ],
"requiresexact": false
},
{
"name": "intent_play_anytrick",
"keyphrases" : ["trukje", "iets cools", "doe een truk", "doe iets cools" ],
"requiresexact": false
},
{
"name": "intent_message_recordmessage_extend",
"keyphrases" : ["neem op", "opnemen" ]
},
{
"name": "intent_blackjack_hit",
"keyphrases" : ["hit", "raak" ],
"requiresexact": false
},
{
"name": "intent_blackjack_stand",
"keyphrases" : ["stand", "stan", "standaard", "kraam" ],
"requiresexact": false
},
{
"name": "intent_play_keepaway",
"keyphrases": ["keepaway", "keep away", "play keepaway", "speel houdt weg", "houdt weg" ],
"requiresexact": false
}
]
2 changes: 2 additions & 0 deletions chipper/pkg/wirepod/localization/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func DownloadVoskModel(language string) {
filename = filename + "tr-0.3.zip"
} else if language == "ru-RU" {
filename = filename + "ru-0.22.zip"
} else if language == "nt-NL" {
filename = filename + "nl-0.22.zip"
} else {
logger.Println("Language not valid? " + language)
return
Expand Down
74 changes: 38 additions & 36 deletions chipper/pkg/wirepod/localization/localization.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package localization

import "github.com/kercre123/wire-pod/chipper/pkg/vars"

var ValidVoskModels []string = []string{"en-US", "it-IT", "es-ES", "fr-FR", "de-DE", "pt-BR", "pl-PL", "zh-CN", "tr-TR", "ru-RU"}
var ValidVoskModels []string = []string{"en-US", "it-IT", "es-ES", "fr-FR", "de-DE", "pt-BR", "pl-PL", "zh-CN", "tr-TR", "ru-RU", "nt-NL"}

const STR_WEATHER_IN = "str_weather_in"
const STR_WEATHER_FORECAST = "str_weather_forecast"
Expand Down Expand Up @@ -80,41 +80,41 @@ var ALL_STR []string = []string{
// All text must be lowercase!

var texts = map[string][]string{
// key en-US it-IT es-ES fr-FR de-DE pl-PL tr-TR ru-RU
STR_WEATHER_IN: {" in ", " a ", " en ", " en ", " in ", " w ", " 的 ", " içinde ", "в"},
STR_WEATHER_FORECAST: {"forecast", "previsioni", "pronóstico", "prévisions", "wettervorhersage", "prognoza", "预报", "tahmin", "прогноз"},
STR_WEATHER_TOMORROW: {"tomorrow", "domani", "mañana", "demain", "morgen", "jutro", "明天", "yarın", "завтра"},
STR_WEATHER_THE_DAY_AFTER_TOMORROW: {"day after tomorrow", "dopodomani", "el día después de mañana", "lendemain de demain", "am tag nach morgen", "pojutrze", "后天", "yarından sonra", "послезавтра"},
STR_WEATHER_TONIGHT: {"tonight", "stasera", "esta noche", "ce soir", "heute abend", "dziś wieczorem", "今晚", "bu gece", "сегодня вечером"},
STR_WEATHER_THIS_AFTERNOON: {"afternoon", "pomeriggio", "esta tarde", "après-midi", "heute nachmittag", "popołudniu", "下午", "bu öğleden sonra", "после полудня"},
STR_EYE_COLOR_PURPLE: {"purple", "lilla", "violeta", "violet", "violett", "fioletowy", "紫色", "mor", "фиолетовый"},
STR_EYE_COLOR_BLUE: {"blue", "blu", "azul", "bleu", "blau", "niebieski", "蓝色", "mavi", "голубой"},
STR_EYE_COLOR_SAPPHIRE: {"sapphire", "zaffiro", "zafiro", "saphir", "saphir", "szafir", "天蓝", "safir", "синий"},
STR_EYE_COLOR_YELLOW: {"yellow", "giallo", "amarillo", "jaune", "gelb", "żółty", "黄色", "sarı", "жёлтый"},
STR_EYE_COLOR_TEAL: {"teal", "verde acqua", "verde azulado", "sarcelle", "blaugrün", "morski", "浅绿", "teal", "бирюзовый"},
STR_EYE_COLOR_TEAL2: {"tell", "acquamarina", "aguamarina", "acquamarina", "acquamarina", "akwamaryn", "蓝绿", "turkuaz", "аквамарин"},
STR_EYE_COLOR_GREEN: {"green", "verde", "verde", "vert", "grün", "zielony", "绿色", "yeşil", "зелёный"},
STR_EYE_COLOR_ORANGE: {"orange", "arancio", "naranja", "orange", "orange", "pomarańczowy", "橙色", "turuncu", "оранжевый"},
STR_ME: {"me", "me", "me", "moi", "mir", "mnie", "我", "ben", "меня"},
STR_SELF: {"self", "mi", "mía", "moi", "mein", "ja", "自己", "kendim", "себя"},
STR_VOLUME_LOW: {"low", "basso", "bajo", "bas", "niedrig", "niski", "低", "düşük", "низкий"},
STR_VOLUME_QUIET: {"quiet", "poco rumoroso", "tranquilo", "silencieux", "ruhig", "cichy", "安静", "sessiz", "тихо"},
STR_VOLUME_MEDIUM_LOW: {"medium low", "medio basso", "medio-bajo", "moyen-doux", "mittelschwer", "średnio niski", "中低", "orta düşük", "ниже среднего"},
STR_VOLUME_MEDIUM: {"medium", "medio", "medio", "moyen", "mittel", "średni", "中档", "orta", "средний"},
STR_VOLUME_NORMAL: {"normal", "normale", "normal", "normal", "normal", "normalny", "正常", "normal", "нормальный"},
STR_VOLUME_REGULAR: {"regular", "regolare", "regular", "régulier", "regulär", "zwyczajny", "标准", "düzenli", "обычный"},
STR_VOLUME_MEDIUM_HIGH: {"medium high", "medio alto", "medio-alto", "moyen-élevé", "mittelhoch", "średno wysoki", "中高", "orta yüksek", "выше среднего"},
STR_VOLUME_HIGH: {"high", "alto", "alto", "élevé", "hoch", "wysoki", "高档", "yüksek", "высокий"},
STR_VOLUME_LOUD: {"loud", "rumoroso", "fuerte", "fort", "laut", "głośny", "高", "gürültülü", "громкий"},
STR_VOLUME_MUTE: {"mute", "muto", "mudo", "", "stumm", "wyciszony", "静音", "sessiz", "немой"},
STR_VOLUME_NOTHING: {"nothing", "nessuno", "nada", "rien", "nichts", "nic", "无声", "hiçbir şey"},
STR_VOLUME_SILENT: {"silent", "silenzioso", "silencio", "silencieux", "still", "cichy", "悄声", "sessiz", "тихий"},
STR_VOLUME_OFF: {"off", "spento", "apagado", "éteindre", "aus", "wyłączony", "关闭", "kapalı", "выключить"},
STR_VOLUME_ZERO: {"zero", "zero", "cero", "zéro", "null", "zero", "零", "sıfır", "ноль"},
STR_NAME_IS: {" is ", " è ", " es ", " est ", " ist ", " to ", "到", " olan ", ""},
STR_NAME_IS2: {"'s", "sono ", "soy ", "suis ", "bin ", " się ", "的", "'nin", ""},
STR_NAME_IS3: {"names", " chiamo ", " llamo ", "appelle ", "werde", "imię", "名字", "adlar", "имена"},
STR_FOR: {" for ", " per ", " para ", " pour ", " für ", " dla ", "给", " için ", "для"},
// key en-US it-IT es-ES fr-FR de-DE pl-PL tr-TR ru-RU nt-NL
STR_WEATHER_IN: {" in ", " a ", " en ", " en ", " in ", " w ", " 的 ", " içinde ", "в", " in "},
STR_WEATHER_FORECAST: {"forecast", "previsioni", "pronóstico", "prévisions", "wettervorhersage", "prognoza", "预报", "tahmin", "прогноз","voorspelling"},
STR_WEATHER_TOMORROW: {"tomorrow", "domani", "mañana", "demain", "morgen", "jutro", "明天", "yarın", "завтра","morgen"},
STR_WEATHER_THE_DAY_AFTER_TOMORROW: {"day after tomorrow", "dopodomani", "el día después de mañana", "lendemain de demain", "am tag nach morgen", "pojutrze", "后天", "yarından sonra", "послезавтра","overmorgen"},
STR_WEATHER_TONIGHT: {"tonight", "stasera", "esta noche", "ce soir", "heute abend", "dziś wieczorem", "今晚", "bu gece", "сегодня вечером","vanavond"},
STR_WEATHER_THIS_AFTERNOON: {"afternoon", "pomeriggio", "esta tarde", "après-midi", "heute nachmittag", "popołudniu", "下午", "bu öğleden sonra", "после полудня","middag"},
STR_EYE_COLOR_PURPLE: {"purple", "lilla", "violeta", "violet", "violett", "fioletowy", "紫色", "mor", "фиолетовый","paars"},
STR_EYE_COLOR_BLUE: {"blue", "blu", "azul", "bleu", "blau", "niebieski", "蓝色", "mavi", "голубой","blauw"},
STR_EYE_COLOR_SAPPHIRE: {"sapphire", "zaffiro", "zafiro", "saphir", "saphir", "szafir", "天蓝", "safir", "синий","saffier"},
STR_EYE_COLOR_YELLOW: {"yellow", "giallo", "amarillo", "jaune", "gelb", "żółty", "黄色", "sarı", "жёлтый","geel"},
STR_EYE_COLOR_TEAL: {"teal", "verde acqua", "verde azulado", "sarcelle", "blaugrün", "morski", "浅绿", "teal", "бирюзовый","wintertaling"},
STR_EYE_COLOR_TEAL2: {"tell", "acquamarina", "aguamarina", "acquamarina", "acquamarina", "akwamaryn", "蓝绿", "turkuaz", "аквамарин","vertellen"},
STR_EYE_COLOR_GREEN: {"green", "verde", "verde", "vert", "grün", "zielony", "绿色", "yeşil", "зелёный","groente"},
STR_EYE_COLOR_ORANGE: {"orange", "arancio", "naranja", "orange", "orange", "pomarańczowy", "橙色", "turuncu", "оранжевый","oranje"},
STR_ME: {"me", "me", "me", "moi", "mir", "mnie", "我", "ben", "меня","mij"},
STR_SELF: {"self", "mi", "mía", "moi", "mein", "ja", "自己", "kendim", "себя","zelf"},
STR_VOLUME_LOW: {"low", "basso", "bajo", "bas", "niedrig", "niski", "低", "düşük", "низкий","laag"},
STR_VOLUME_QUIET: {"quiet", "poco rumoroso", "tranquilo", "silencieux", "ruhig", "cichy", "安静", "sessiz", "тихо","rustig"},
STR_VOLUME_MEDIUM_LOW: {"medium low", "medio basso", "medio-bajo", "moyen-doux", "mittelschwer", "średnio niski", "中低", "orta düşük", "ниже среднего","middel laag"},
STR_VOLUME_MEDIUM: {"medium", "medio", "medio", "moyen", "mittel", "średni", "中档", "orta", "средний","medium"},
STR_VOLUME_NORMAL: {"normal", "normale", "normal", "normal", "normal", "normalny", "正常", "normal", "нормальный","normaal"},
STR_VOLUME_REGULAR: {"regular", "regolare", "regular", "régulier", "regulär", "zwyczajny", "标准", "düzenli", "обычный","normaal"},
STR_VOLUME_MEDIUM_HIGH: {"medium high", "medio alto", "medio-alto", "moyen-élevé", "mittelhoch", "średno wysoki", "中高", "orta yüksek", "выше среднего","gemiddeld hoog"},
STR_VOLUME_HIGH: {"high", "alto", "alto", "élevé", "hoch", "wysoki", "高档", "yüksek", "высокий","hoog"},
STR_VOLUME_LOUD: {"loud", "rumoroso", "fuerte", "fort", "laut", "głośny", "高", "gürültülü", "громкий","luidruchtig"},
STR_VOLUME_MUTE: {"mute", "muto", "mudo", "", "stumm", "wyciszony", "静音", "sessiz", "немой","stom"},
STR_VOLUME_NOTHING: {"nothing", "nessuno", "nada", "rien", "nichts", "nic", "无声", "hiçbir şey","Niets"},
STR_VOLUME_SILENT: {"silent", "silenzioso", "silencio", "silencieux", "still", "cichy", "悄声", "sessiz", "тихий","stil"},
STR_VOLUME_OFF: {"off", "spento", "apagado", "éteindre", "aus", "wyłączony", "关闭", "kapalı", "выключить","uit"},
STR_VOLUME_ZERO: {"zero", "zero", "cero", "zéro", "null", "zero", "零", "sıfır", "ноль","nul"},
STR_NAME_IS: {" is ", " è ", " es ", " est ", " ist ", " to ", "到", " olan ", ""," is "},
STR_NAME_IS2: {"'s", "sono ", "soy ", "suis ", "bin ", " się ", "的", "'nin", "",""},
STR_NAME_IS3: {"names", " chiamo ", " llamo ", "appelle ", "werde", "imię", "名字", "adlar", "имена","namen"},
STR_FOR: {" for ", " per ", " para ", " pour ", " für ", " dla ", "给", " için ", "для"," voor "},
}

func GetText(key string) string {
Expand All @@ -136,6 +136,8 @@ func GetText(key string) string {
return data[7]
} else if vars.APIConfig.STT.Language == "ru-RU" {
return data[8]
} else if vars.APIConfig.STT.Language == "nt-NL" {
return data[9]
}
}
return data[0]
Expand Down
2 changes: 2 additions & 0 deletions chipper/webroot/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ input[type='radio']:disabled:after {
width: 100%;
display: flex;
justify-content: center;
height: 100vh; /* Keeps things at the top*/
align-items: start;
}

.main-nav-parent {
Expand Down
1 change: 1 addition & 0 deletions chipper/webroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ <h2>STT Language</h2>
<option value="tr-TR">Turkish (TR)</option>
<option value="zh-CN">Chinese (CN)</option>
<option value="ru-RU">Russian (RU)</option>
<option value="nt-NL">Dutch (NL)</option>
</select>
</div>
<div>
Expand Down
Loading

0 comments on commit 0dafb3c

Please sign in to comment.