Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when Importing Whisper Turbo in Electron #68

Open
raviadi12 opened this issue Sep 23, 2024 · 1 comment
Open

Error when Importing Whisper Turbo in Electron #68

raviadi12 opened this issue Sep 23, 2024 · 1 comment

Comments

@raviadi12
Copy link

First of all, i'm sorry that i'm kinda newbie into Electron apps or something like that. What i wanna do, is trying to implement a real-time speech transcribe inside my electron Apps, however, everytime i import a Whisper Turbo package, it always ended up to this error

export { InferenceSession } from "./inferenceSession";
^^^^^^

SyntaxError: Unexpected token 'export'
    at wrapSafe (node:internal/modules/cjs/loader:1385:20)
    at Module._compile (node:internal/modules/cjs/loader:1435:41)
    at Module._extensions..js (node:internal/modules/cjs/loader:1564:10)
    at Module.load (node:internal/modules/cjs/loader:1295:32)
    at Module._load (node:internal/modules/cjs/loader:1111:12)
    at c._load (node:electron/js2c/node_init:2:17025)
    at cjsLoader (node:internal/modules/esm/translators:350:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:286:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)

The error occured in my main.js file that has import headers looks like this

import {
  initialize,
  SessionManager,
  DecodingOptionsBuilder,
  Segment,
  AvailableModels
} from "whisper-turbo";

Any help is appreciated. Thank you.

@fbehrens
Copy link

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants