Giter VIP home page Giter VIP logo

Comments (5)

ponlponl123 avatar ponlponl123 commented on July 18, 2024

The log shows that it cannot find the dotenv module to resolve this issue.
You can use the command npm install dotenv to install the dotenv module to fix this problem!

Thanks for the feedback. I will make it even better in the future! 🙂

from -prototype-aivtuber.

wanxuntong avatar wanxuntong commented on July 18, 2024

It can be installed normally in the system directory, but an error will be reported in the project directory (Google translation)

C:\WINDOWS\system32>npm install dotenv
up to date, audited 2 packages in 2s
found 0 vulnerabilities

I:\aivtuber\AIVTuber-main\TTS>npm install dotenv
npm ERR! code 1
npm ERR! path I:\aivtuber\AIVTuber-main\TTS\node_modules\speaker
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.8 found at "C:\Users\1\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (D:\Node\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:122:47)
npm ERR! gyp ERR! stack at D:\Node\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (D:\Node\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:364:14)
npm ERR! gyp ERR! stack at D:\Node\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at D:\Node\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:385:16
npm ERR! gyp ERR! stack at D:\Node\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at D:\Node\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:410:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1100:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22000
npm ERR! gyp ERR! command "D:\Node\node.exe" "D:\Node\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd I:\aivtuber\AIVTuber-main\TTS\node_modules\speaker
npm ERR! gyp ERR! node -v v16.19.1
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! D:\Node\node_cache_logs\2023-03-12T04_23_06_374Z-debug-0.log

from -prototype-aivtuber.

ponlponl123 avatar ponlponl123 commented on July 18, 2024

#This error message appears to be related to the speaker package in a Node.js project. There are a few different warnings and errors that are shown in the output:

  • Two npm WARN messages are displayed, indicating that two packages (request and querystring) are deprecated and may cause issues in the future. It is recommended to update to the latest versions of these packages, or use alternative packages if possible.

  • The npm ERR! code 1 message indicates that there was an error during the installation or build process of the speaker package.

  • The subsequent output shows the error message that was generated during the build process. It appears to be related to the node-gyp package, which is used for building native Node.js add-ons. The error message suggests that node-gyp was unable to find a compatible version of Visual Studio to use for building the speaker package.

To resolve this issue, there are a few potential steps that could be taken:

  • Update the request and querystring packages to their latest versions or use alternative packages to avoid the deprecation warnings.

  • Ensure that a compatible version of Visual Studio is installed on the system, and that it is properly configured for use with node-gyp. The error message indicates that Visual Studio 2017 or newer is required, and that the "Desktop development with C++" workload needs to be installed. The node-gyp documentation provides more detailed instructions for configuring Visual Studio on Windows: https://github.com/nodejs/node-gyp#on-windows.

  • If the speaker package is not necessary for the project, it could be removed or replaced with an alternative package that does not require native add-ons to be built.

I think this issue is similar to #4, or you can check out Issues #4 !

I think this will solve your problem!

from -prototype-aivtuber.

wanxuntong avatar wanxuntong commented on July 18, 2024

(Google Translate) After running 'node main.js' appeared

‘listening on localhost:8000
Pronounce by yourself:’

What should I enter?
Enter '123123' and it will appear

No previous file to delete
Error: Command failed: "FFMPEG_PATH" -i "path/to/output.mp3" -acodec pcm_s16le -ac 1 -ar 16000 "path/to/output.wav"
'"FFMPEG_PATH"' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

at ChildProcess.exithandler (node:child_process:402:12)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {

code: 1,
killed: false,
signal: null,
cmd: '"FFMPEG_PATH" -i "path/to/output.mp3" -acodec pcm_s16le -ac 1 -ar 16000 "path/to/output.wav"'
}
File saved.
text !== "exit" : Method
node:events:491
throw er; // Unhandled 'error' event
^

Error: ENOENT: no such file or directory, open 'I:\aivtuber\AIVTuber-main\TTS\path\to\output.wav'
Emitted 'error' event on ReadStream instance at:
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'I:\aivtuber\AIVTuber-main\TTS\path\to\output.wav'
}

And generated 'output.mp3' under '\TTS\path\to'
Where is the bug?

from -prototype-aivtuber.

ponlponl123 avatar ponlponl123 commented on July 18, 2024

In line 68 of the main.js file you can try to change from

await fs.unlink('path/to/output.wav', (err) => {
         if (err) console.log('No previous file to delete');
       });

is

try {
         fs.unlinkSync('path/to/output.wav');
       } catch (err) {
         console.log('No previous file to delete');
       }

Oh yes, and you need to change the ffmpeg_path variable to a valid path address like c:/ffmpeg/bin/ffmpeg.exe.

I think this will solve your problem!

from -prototype-aivtuber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.