echogarden-project / echogarden

Easy-to-use speech toolset. Written in TypeScript. Includes tools for synthesis, recognition, alignment, speech translation, language detection, source separation and more.
GNU General Public License v3.0
173 stars 17 forks source link

Trouble running development environment #63

Closed cvl01 closed 1 month ago

cvl01 commented 1 month ago

I followed the instructions for setting up a development environment, but have trouble getting things to work. I am not very common with node, so excuse me if I am missing something obvious.

When running tsc . I get the following error.

$ tsc .
error TS6231: Could not resolve the path '' with the extensions: '.ts', '.tsx', '.d.ts', '.cts', '.d.cts', '.mts', '.d.mts'.
  The file is in the program because:
    Root file specified for compilation

Found 1 error.

I then tried running tsc, without the . as suggested online. This gives me


$ tsc
src/audio/AudioPlayer.ts:286:45 - error TS2307: Cannot find module 'speaker' or its corresponding type declarations.

286   const { default: Speaker } = await import('speaker')
                                                ~~~~~~~~~

Found 1 error in src/audio/AudioPlayer.ts:286```

Seems like speaker is not installed. Does that have to do with it being a peerdependency? Running `npm install speaker` does not change anything. Could it be that I have to install Visual Studio to compile speaker?
rotemdan commented 1 month ago

It's a TypeScript error, no an Node.js error. TypeScript doesn't know it's a peer dependency, and although the import it dynamic, it still seems to look for it. I'm not sure there's anything I can do about that.

I get that locally too. I simply installed the speaker package to workaround that message. You can also try adding // @ts-ignore before that line to silence the message.

cvl01 commented 1 month ago

Wow! That was a fast response! I managed to fix it, indeed by installing speaker. However, I had to install visual studio with c++ development tools to properly install the speaker package. That worked, and removed the error!