I have a problem with playing sounds.
the purpose: making a text to speech program that talks with my voice.
i recorded a lot of phonemes (.wav files with parts of speech) that need to play after each other in the right order.
each sound must play ONLY if the previous sound finished playing.
so if my program needs to say 'hello' then it does this:
play("h.wav")
if "h.wav":isStopped() then:
play("e.wav")
if "e.wav":isStopped() then... etc ...
for test purposes i want to play "a.wav" twice but the problem is that i only hear 'A' once...
if i play e.g. 'A' and then 'B', it works fine..
any help would be mush appreciated!
this is the test code i currently have:
Code: Select all
function love.load()
voice = {"a","b","e","f", ......}
for i in pairs(voice) do
voice[i] = love.audio.newSource("VOICE/" .. voice[i] .. ".wav", "static")
end
end
function love.keypressed(key)
if key == "a" then
voice[1]:play()
while voice[1]:isPlaying() do end
voice[1]:play()
while voice[1]:isPlaying() do end
end
end