diff options
Diffstat (limited to '')
-rwxr-xr-x | aataaj.lua | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -177,16 +177,19 @@ io.flush() | |||
177 | 177 | ||
178 | 178 | ||
179 | local speak = function(card, subdevice, device, words, printIt, forkIt) | 179 | local 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 | ||
187 | print(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() |
192 | end | 195 | end |