facebookresearch / playtorch

PlayTorch is a framework for rapidly creating mobile AI experiences.
https://playtorch.dev/
MIT License
830 stars 101 forks source link

AudioUtil is not working on Android #204

Open shovelingpig opened 1 year ago

shovelingpig commented 1 year ago

Version

0.2.4

Problem Area

react-native-pytorch-core (core package)

Steps to Reproduce

I want to create a simple speech recognition app using PlayTorch.

I'm working on the Expo Snack environment.

However, I found that AudioUtil is not working on Android.

Here is the simplest reproducible code.

export default function App() { AudioUtil.startRecord(); }



After downloading the PlayTorch app on Android, when I scan the QR code shown on Snack, an error message "Device disconnected" appears as shown in the attached image.

My final goal is to reproduce the [Wav2Vec example](https://github.com/facebookresearch/playtorch/blob/main/react-native-pytorch-core/example/src/toolbox/models/Wav2Vec2.tsx).

How can I achieve this goal?

### Expected Results

Error Message: "Device disconnected"

### Code example, screenshot, or link to repository

<img width="316" alt="스크린샷 2023-03-23 오후 7 38 00" src="https://user-images.githubusercontent.com/55829146/227178006-0a796693-897c-4387-951a-c3ba664560f1.png">

<img width="252" alt="스크린샷 2023-03-23 오후 7 35 35" src="https://user-images.githubusercontent.com/55829146/227178033-fcf0d1d4-4b51-4cab-a7e0-e0e3a66b9387.png">