Unable to select TTS voice from list.
MrMartiniMo opened this issue ยท 6 comments
Hi @z0fa
now it looks like this. It's ok. I can access all the voices and I like the up and down buttons ๐
Maybe you can add a preview button to test the voice for a future release.
My quick fix is to hardcode the voices in main.lua
function module.getVoice()
local toRet = settings.voice1.get()
local unitSex = UnitSex("questnpc") or UnitSex("npc")
if unitSex == 2 then -- male
toRet = 55 --settings.voice1.get()
elseif unitSex == 3 then -- female
toRet = 48 --settings.voice2.get()
else
toRet = 64 --settings.voice3.get()
end
local voices = Array.new(C_VoiceChat.GetTtsVoices())
local voiceToRet = voices:find(
function(v)
if v.voiceID == toRet then
return true
end
end
)
return voiceToRet
end
I used this code to output all German voices and it's voiceIDs:
print('-------------------------')
table.foreach(
C_VoiceChat.GetTtsVoices(),
function(k,v)
if string.find(v.name, 'DE') then
print(v.voiceID .. ': ' .. v.name)
end
end
)
print('-------------------------')
Oh wow, where did you got all these voices from? I'm migrating the addon settings to the new api, the new selectbox should be scrollable by default. There are some taint errors with the new api, i'm waiting for a fix before releasing the new version...
Thank you for the report :)
I think it is default on macOS but I am not sure ๐ Thank you for your quick reply. Really nice Addon, I love it ๐