diff options
Diffstat (limited to 'app/relay/modules')
| -rw-r--r-- | app/relay/modules/samplernn.js | 7 | ||||
| -rw-r--r-- | app/relay/modules/test.js | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/app/relay/modules/samplernn.js b/app/relay/modules/samplernn.js index d3b5012..64a6b88 100644 --- a/app/relay/modules/samplernn.js +++ b/app/relay/modules/samplernn.js @@ -6,11 +6,14 @@ const cwd = process.env.SAMPLERNN_CWD || path.join(process.env.HOME, 'code/' + n const fetch = { type: 'perl', script: 'get.pl', - // here i need to bridge again... get the filename that comes back from youtube-dl - // and tell the cortex that URL -> fn and add the filename!s params: (task) => { console.log(task) return [ task.opt.url ] + }, + listen: (task, line, i) => { + // here i need to bridge again... get the filename that comes back from youtube-dl + // and tell the cortex that URL -> fn and add the filename!s + return null } } const train = { diff --git a/app/relay/modules/test.js b/app/relay/modules/test.js index b0753f8..57a324a 100644 --- a/app/relay/modules/test.js +++ b/app/relay/modules/test.js @@ -17,6 +17,15 @@ const live = { type: 'python', script: 'test.py', live: true, + listen: (task, line, i) => { + if (line.match('orange')) { + return { type: 'progress', task, mode: 'orange', progress: i } + } + if ( (i % 10) === 9) { + return { type: 'epoch', task, epoch: (i/10)|0 } + } + return null + } } export default { |
