NeoTechni Well-Known Member Licensed User Longtime User May 31, 2013 #1 Anyone know how to do earcons using the TTS library? ie: This lets you replace text like [click] with a wav file inside the sentence.
Anyone know how to do earcons using the TTS library? ie: This lets you replace text like [click] with a wav file inside the sentence.
Erel B4X founder Staff member Licensed User Longtime User Jun 2, 2013 #2 Try this (not tested): Code: Copy Sub AddEarcon(Earcon As String, Dir As String, FileName As String) Dim r As Reflector r.Target = TTS Log(r.RunMethod3("addEarcon", Earcon, "java.lang.String", File.Combine(Dir, FileName), _ "java.lang.String")) '0 for SUCCESS, -1 for ERROR End Sub It will not work with asset files (not sure about internal files). Upvote 0
Try this (not tested): Code: Copy Sub AddEarcon(Earcon As String, Dir As String, FileName As String) Dim r As Reflector r.Target = TTS Log(r.RunMethod3("addEarcon", Earcon, "java.lang.String", File.Combine(Dir, FileName), _ "java.lang.String")) '0 for SUCCESS, -1 for ERROR End Sub It will not work with asset files (not sure about internal files).