Closed BlazJurisic closed 1 year ago
No response
react-native-pytorch-core (core package)
const outputAudioFloat32 = await model.forward(torch.zeros(80000)) const _outputAudio = await experimental.audioFromBytes([...outputAudioFloat32.data()], 16000) _outputAudio.play()
audio plays as it should
broken audio..
I have tried with blobs, Arrays and buffers, literally everything
Figured it out finally, you have to transform first to pcm 16 and to bytes (which are uint8) afterwards.
Version
No response
Problem Area
react-native-pytorch-core (core package)
Steps to Reproduce
Expected Results
audio plays as it should
Code example, screenshot, or link to repository
broken audio..
I have tried with blobs, Arrays and buffers, literally everything