0

I'm having trouble utilizing the Teachable Machine's audio model code snippet to create an offline model. I downloaded the metadata and model json's and would like to accomplish something similar to

async function createModel() {
       const checkpointURL = 'model.json'; // model topology
       const metadataURL = 'metadata.json'; // model metadata
       const recognizer = await speechCommands.create('model.json', 'metadata.json');
       return recognizer;
   }

where you'd usually put both links to the files as arguments to the create() method. I saw a post extremely similar to my issue, but it was for the pose teachable machine model and I can't seem to find a similar load() function in the audio model's speech-commands' script that would allow me to get these files from local storage.

DrWalrus
  • 1
  • 1

1 Answers1

0

Found it. Just prepend file:// to the json's directories.

DrWalrus
  • 1
  • 1