8000 Importing whisper-node package changes process.cwd() · Issue #51 · ariym/whisper-node · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Importing whisper-node package changes process.cwd() #51
Open
@PeterCarragher

Description

@PeterCarragher

Importing whisper-node package changes process.cwd().
Verison of whisper used to repro (includes a recent patch): "@distube/ytdl-core": "github:soya-daizu/ytdl-core#sig-patch"

const whisper = require('whisper-node');
audio_file = "example.wav"
audio_path = path.join(process.cwd(), audio_file);

leads to: [whisper-node] Transcribing: <project_dir>/node_modules/whisper-node/lib/whisper.cpp/<audio_file>

Whereas the desired behavior is for process.cwd() to be set to the <project_dir>. The following import ordering is a workaround:

audio_file = "example.wav"
audio_path = path.join(process.cwd(), audio_file );
const whisper = require('whisper-node');

which leads to: [whisper-node] Transcribing: <project_dir>/<audio_file>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0