Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Speech-To-Text- / Audio-Module-Demo #52

Open
mrcwbr opened this issue Mar 28, 2022 · 1 comment
Open

Speech-To-Text- / Audio-Module-Demo #52

mrcwbr opened this issue Mar 28, 2022 · 1 comment

Comments

@mrcwbr
Copy link

mrcwbr commented Mar 28, 2022

Area Select

Website/Documentation

Description

Hey I'm trying to use PyTorch live for a Speech-To-Text feature. It would be great if there were a tutorial for this use case.

I read the documentation for the audio module. but I thing the documentation isn't up to date. the module provides only a record function in version "react-native-pytorch-core": "0.1.3", not start and stop-recording as described in the article.

I tried a small playground but the following code leads to an error:

const audio = await AudioUtil.record(2)
console.log('audio', audio)
const {result} = await MobileModel.execute(model_wav2vec, { audio })
console.log('result', result)

there is also a great tutorial for android but none for PyTorch live (react native)

@mrcwbr mrcwbr changed the title Speech-To-Text Demo Speech-To-Text- / Audio-Module-Demo Mar 28, 2022
@jeffxtang
Copy link
Contributor

Thanks for your kind note on the Android demo tutorial - glad you found it helpful :)

After you run:

cd live/react-native-pytorch-core/example
npx torchlive-cli run-android

Do you not see the Wav2Vec2 example?

image

image

You can also launch this from iOS:
···
cd live/react-native-pytorch-core/example/ios
pod install
open PyTorchCoreExample.xcworkspace
···

The code that handles recording is here.

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

No branches or pull requests

2 participants