aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xaataaj.lua17
1 files changed, 10 insertions, 7 deletions
diff --git a/aataaj.lua b/aataaj.lua
index 371adbb..7e6c762 100755
--- a/aataaj.lua
+++ b/aataaj.lua
@@ -177,16 +177,19 @@ io.flush()
177 177
178 178
179local speak = function(card, subdevice, device, words, printIt, forkIt) 179local speak = function(card, subdevice, device, words, printIt, forkIt)
180-- local file = os.tmpname() 180 local file = os.tmpname() .. '.wav'
181-- D('Creating temporary script file at ' .. file) 181 D('Creating temporary script file at ' .. file)
182 local s = '#!/bin/bash\necho "' .. words .. '" | ALSA_CARD=' .. device .. ' ' .. speaker 182-- local s = '#!/bin/bash\necho "' .. words .. '" | ALSA_CARD=' .. device .. ' ' .. speaker
183-- local s = '#!/bin/bash\necho "' .. words .. '" | ' .. speaker .. ' -d ' .. device 183-- local s = '#!/bin/bash\necho "' .. words .. '" | ' .. speaker .. ' -d hw:' .. device .. ',' .. subdevice
184-- local s = '#!/bin/bash\necho "' .. words .. '" | ' .. speaker .. ' -w ' .. file .. ' ; aplay -q --device=hw:CARD=' .. card .. ',DEV=' .. subdevice .. ' ' .. file 184 local s = '#!/bin/bash\n' .. speaker .. ' -d hw:' .. device .. ',' .. subdevice .. ' "' .. words .. '"'
185-- local s = '#!/bin/bash\necho "' .. words .. '" | ' .. speaker .. ' -w ' .. file .. ' ; aplay --device=hw:' .. device .. ',' .. subdevice .. ' ' .. file
186-- local s = '#!/bin/bash\n' .. speaker .. ' -w ' .. file .. ' "' .. words .. '" ; aplay --device=hw:' .. device .. ',' .. subdevice .. ' ' .. file
187print(s)
185 if printIt then print(words) end 188 if printIt then print(words) end
186 if forkIt then 189 if forkIt then
187 __(s):noErr():noOut():fork() 190 __(s):fork()
188 else 191 else
189 __(s):noErr():noOut():Do() 192 __(s):Do()
190 end 193 end
191-- io.flush() 194-- io.flush()
192end 195end