usefulsensors / moonshine

Fast and accurate automatic speech recognition (ASR) for edge devices
MIT License
2.25k stars 98 forks source link

PyTorch and live transcription with mic #15

Closed ramkumarkoppu closed 1 month ago

ramkumarkoppu commented 1 month ago

Hi,

Awesome work! I would like to use just PyTorch and skip Keras installation and with the Mac mic for live transcription instead of using recording audio clip, how do I do that please?

keveman commented 1 month ago

The inference code is written in Keras, so you can't skip Keras installation. However, the default installation uses the PyTorch backend. And Keras library itself does not depend on other software such as TensorFlow or JAX.

ramkumarkoppu commented 1 month ago

and how do I use mic on Mac/Ubuntu for live? the example code on the read me is using recorded audio file

keveman commented 1 month ago

The transcribe function accepts a filename or a KerasTensor. You can create a KerasTensor from a numpy array or a Torch Tensor.

keveman commented 1 month ago

Closing as there are no actionable followups.