Rei-x / discord-speech-recognition

Speech to text extension for discord.js
https://npmjs.com/package/discord-speech-recognition
MIT License
56 stars 22 forks source link

I am not sure what my problems is. Here is the log when I run "npm install" . #24

Closed Ajharul7 closed 2 years ago

Ajharul7 commented 2 years ago

$ npm install npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

sodium@3.0.2 preinstall D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium node install.js --preinstall

MS Version: 2015 Preinstall Mode Download libsodium.lib MS Version: 2015 Platform Tool is v140 Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/x64/Release/v140/dynamic/libsodium.dll Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/x64/Release/v140/dynamic/libsodium.exp Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/x64/Release/v140/dynamic/libsodium.lib Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/x64/Release/v140/dynamic/libsodium.pdb Libs for version v140 downloaded. Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/core.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_aead_aes256gcm.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_aead_chacha20poly1305.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_aead_xchacha20poly1305.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_auth.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_auth_hmacsha256.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_auth_hmacsha512.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_auth_hmacsha512256.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_box.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_box_curve25519xchacha20poly1305.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_box_curve25519xsalsa20poly1305.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_ed25519.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_hchacha20.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_hsalsa20.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_salsa20.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_salsa2012.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_core_salsa208.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_generichash.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_generichash_blake2b.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_hash.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_hash_sha256.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_hash_sha512.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_kdf.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_kdf_blake2b.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_kx.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_onetimeauth.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_onetimeauth_poly1305.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_pwhash.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_pwhash_argon2i.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_pwhash_argon2id.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_pwhash_scryptsalsa208sha256.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_scalarmult.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_scalarmult_curve25519.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_scalarmult_ed25519.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_secretbox.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_secretbox_xchacha20poly1305.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_secretbox_xsalsa20poly1305.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_secretstream_xchacha20poly1305.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_shorthash.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_shorthash_siphash24.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_sign.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_sign_ed25519.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_sign_edwards25519sha512batch.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_chacha20.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_salsa20.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_salsa2012.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_salsa208.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_xchacha20.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_stream_xsalsa20.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_verify_16.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_verify_32.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/crypto_verify_64.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/export.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/randombytes.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/randombytes_salsa20_random.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/randombytes_sysrandom.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/runtime.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/utils.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium/version.h Download: https://raw.githubusercontent.com/paixaop/libsodium-bin/master/1.0.16/include/sodium.h Include files downloaded. Prebuild steps completed. Binary libsodium distribution installed in ./deps/build

@discordjs/opus@0.5.3 install D:\discord-speech-recognition\examples\simpleBot\node_modules\@discordjs\opus node-pre-gyp install --fallback-to-build

[@discordjs/opus] Success: "D:\discord-speech-recognition\examples\simpleBot\node_modules\@discordjs\opus\prebuild\node-v83-napi-v3-win32-x64-unknown-unknown\opus.node" is installed via remote

sodium@3.0.2 install D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium node install.js --install

MS Version: 2015 Install Mode

D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) gyp ERR! find VS gyp ERR! find VS msvs_version was set from command line or npm config gyp ERR! find VS - looking for Visual Studio version 2015 gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer gyp ERR! find VS looking for Visual Studio 2015 gyp ERR! find VS - not found gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 gyp ERR! find VS gyp ERR! find VS valid versions for msvs_version: gyp ERR! find VS gyp ERR! find VS ** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ** gyp ERR! find VS gyp ERR! configure error gyp ERR! stack Error: Could not find any Visual Studio installation to use gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 gyp ERR! stack at ChildProcess.exithandler (child_process.js:390:5) gyp ERR! stack at ChildProcess.emit (events.js:400:28) gyp ERR! stack at maybeClose (internal/child_process.js:1058:16) gyp ERR! System Windows_NT 10.0.16299 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium gyp ERR! node -v v14.18.1 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium\install.js:293 throw new Error(cmdLine + ' exited with code ' + code); ^

Error: node-gyp rebuild exited with code 1 at ChildProcess. (D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium\install.js:293:19) at ChildProcess.emit (events.js:400:28) at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12) npm WARN simplebot@1.0.0 No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! sodium@3.0.2 install: node install.js --install npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the sodium@3.0.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ajhar\AppData\Roaming\npm-cache_logs\2021-10-18T12_16_47_010Z-debug.log

Rei-x commented 2 years ago

You need to install some additional things to run it on windows: https://github.com/nodejs/node-gyp#on-windows

Ajharul7 commented 2 years ago

Tried the I get this error : npm ERR! code 1 npm ERR! path D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js --preinstall npm ERR! MS Version: 2019 npm ERR! D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium\install.js:312 npm ERR! console.log('Invalid msvs_version ' + msvsVersion + '\n'); npm ERR! ^ npm ERR! npm ERR! ReferenceError: msvsVersion is not defined npm ERR! at errorInvalidMSVSVersion (D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium\install.js:312:43) npm ERR! at checkMSVSVersion (D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium\install.js:329:9) npm ERR! at Object. (D:\discord-speech-recognition\examples\simpleBot\node_modules\sodium\install.js:353:5) npm ERR! at Module._compile (node:internal/modules/cjs/loader:1095:14) npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10) npm ERR! at Module.load (node:internal/modules/cjs/loader:975:32) npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12) npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) npm ERR! at node:internal/main/run_main_module:17:47 npm ERR! npm ERR! Node.js v17.0.0

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ajhar\AppData\Local\npm-cache_logs\2021-10-24T07_01_12_173Z-debug.log

Rei-x commented 2 years ago

Did you run this command?

npm config set msvs_version 2017
Ajharul7 commented 2 years ago

Did you run this command?

npm config set msvs_version 2017

Yes . The module sodium is causing the problem. Tried the above command still not working 😢 show same error.

Rei-x commented 2 years ago

I can't install sodium on windows, on linux it works fine. You can use other encryption package like libsodium-wrappers or tweetnacl (you can read more here: https://discordjs.guide/voice/#installation)

How to replace sodium in simpleBot example:

  1. Delete package-lock.json
  2. Delete this line from package.json: https://github.com/Rei-x/discord-speech-recognition/blob/f5858d707b61ae4f413ec88f6104fb94e748b24b/examples/simpleBot/package.json#L17
  3. Run:
    npm i tweetnacl --legacy-peer-deps
  4. Now replace "token" with your token in index.js: https://github.com/Rei-x/discord-speech-recognition/blob/f5858d707b61ae4f413ec88f6104fb94e748b24b/examples/simpleBot/index.js#L34
  5. Run:
    npm start

And it should work.

Ajharul7 commented 2 years ago

I can't install sodium on windows, on linux it works fine. You can use other encryption package like libsodium-wrappers or tweetnacl (you can read more here: https://discordjs.guide/voice/#installation)

How to replace sodium in simpleBot example:

  1. Delete package-lock.json
  2. Delete this line from package.json: https://github.com/Rei-x/discord-speech-recognition/blob/f5858d707b61ae4f413ec88f6104fb94e748b24b/examples/simpleBot/package.json#L17
  3. Run:
npm i tweetnacl --legacy-peer-deps
  1. Now replace "token" with your token in index.js: https://github.com/Rei-x/discord-speech-recognition/blob/f5858d707b61ae4f413ec88f6104fb94e748b24b/examples/simpleBot/index.js#L34
  2. Run:
npm start

And it should work.

It finally worked. Thank you very much . Really greatful.

Ajharul7 commented 2 years ago

Dont want to open the issue but wanted to ask if this works for discordjs v12 ?