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

Invalid Data Location on audio models #1169

Open
1 of 5 tasks
FelippeChemello opened this issue Jan 26, 2025 · 1 comment
Open
1 of 5 tasks

Invalid Data Location on audio models #1169

FelippeChemello opened this issue Jan 26, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@FelippeChemello
Copy link

System Info

@huggingface/[email protected]

[email protected]

Environment/Platform

  • Website/web-app
  • Browser extension
  • Server-side (e.g., Node.js, Deno, Bun)
  • Desktop app (e.g., Electron)
  • Other (e.g., VSCode extension)

Description

I have tried both the Xenova/whisper-tiny and onnx-community/moonshine-tiny-ONNX models, and they throw the following error when the pipeline is called: Invalid data location: undefined for input.

Reproduction

import { pipeline } from "@huggingface/transformers"

console.log(`Loading models...`)

const model_id = "Xenova/whisper-tiny"
const transcriber = await pipeline("automatic-speech-recognition", model_id)

console.log(`Models loaded!`)

const transcribe = async (buffer: Float32Array) => {
    const output = await transcriber(buffer)

    console.log(output)
}

self.onmessage = async ({ data }) => {
    const { buffer } = data

    await transcribe(buffer)
}
const audioURL = URL.createObjectURL(audioFile)
read_audio(audioURL, 16000).then(audioData => {
    worker.current?.postMessage({ buffer: audioData })
})
@FelippeChemello FelippeChemello added the bug Something isn't working label Jan 26, 2025
@xenova
Copy link
Collaborator

xenova commented Feb 8, 2025

Related: microsoft/onnxruntime#20431

Can you confirm that the audioData you are passing is valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants