merging in changes to tts and fixing env filename again

This commit is contained in:
William Jordan-Cooley 2024-10-21 16:41:12 -04:00
parent bc20769daa
commit db61a1ae69
2 changed files with 1 additions and 11 deletions

View file

@ -22,7 +22,7 @@ void main() async {
// #Pangea
try {
await dotenv.load(fileName: ".env.local_choreo");
await dotenv.load(fileName: ".env");
} catch (e) {
Logs().e('Failed to load .env file', e);
}

View file

@ -35,20 +35,10 @@ class TtsController {
debugPrint("voices: $voices");
availableLangCodes = (voices as List)
.map((v) {
<<<<<<< Updated upstream
// on iOS / web, the codes are in 'locale', but on Android, they are in 'name'
final nameCode = v['name']?.split("-").first;
final localeCode = v['locale']?.split("-").first;
return nameCode.length == 2 ? nameCode : localeCode;
=======
debugPrint('v: $v');
//@ggurdin i changed this from name to locale
//in my testing, that's where the language code is stored
// maybe it's different for different devices? was it different in your android testing?
// return v['name']?.split("-").first;
return v['locale']?.split("-").first;
>>>>>>> Stashed changes
})
.toSet()
.cast<String>()