Mercurial > hg > ugly-duckling
diff src/app/services/feature-extraction/FeatureExtractionWorker.ts @ 320:a16d968d646e
Bodge in to load pyin and nnls-chroma from server on startup
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Mon, 15 May 2017 23:52:23 +0100 |
parents | 75a234459d3b |
children | 89208e8af8cc |
line wrap: on
line diff
--- a/src/app/services/feature-extraction/FeatureExtractionWorker.ts Mon May 15 17:57:42 2017 +0100 +++ b/src/app/services/feature-extraction/FeatureExtractionWorker.ts Mon May 15 23:52:23 2017 +0100 @@ -111,7 +111,10 @@ constructor(workerScope: DedicatedWorkerGlobalScope, private requireJs: RequireJs) { this.workerScope = workerScope; - this.remoteLibraries = new Map<LibraryKey, LibraryUri>(); + this.remoteLibraries = new Map<LibraryKey, LibraryUri>([ + ['nnls-chroma', 'assets/extractors/NNLSChroma.js'], + ['pyin', 'assets/extractors/PYin.umd.js'], + ]); this.service = new ThrottledReducingAggregateService(); this.setupImportLibraryListener(); this.server = new WebWorkerStreamingServer( @@ -124,6 +127,7 @@ this.workerScope.onmessage = (ev: MessageEvent) => { const sendResponse = (result) => { + console.warn(ev.data.method); this.workerScope.postMessage({ method: ev.data.method, result: result