Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 2.12 KB

File metadata and controls

56 lines (36 loc) · 2.12 KB

LFM2.5-Audio WebGPU Demo

Discord

This example demonstrates LFM2.5-Audio-1.5B running entirely in your browser using WebGPU and ONNX Runtime Web.

You can find all the code in this Hugging Face Space, including a deployed version you can interact with 0 setup here.

Quickstart

  1. Clone the repository:

    git clone https://huggingface.co/spaces/LiquidAI/LFM2.5-Audio-1.5B-transformers-js/
    cd LFM2.5-Audio-1.5B-transformers-js
  2. Make sure you have npm (Node Package Manager) installed in your system:

    npm --version

    If the previous command throws an error it means you don't have npm and you must install it to build this demo . If you come from the Python world, you can think of npm as the Node JS equivalent of pip.

    Downloading and installing Node.js and npm

  3. Install dependencies specified in package.json with npm

    npm install
  4. Start the development server:

    npm run dev

    The dev server will start and provide you with a local URL (typically http://localhost:5173) where you can access the app in your browser.

Features

  • ASR (Speech Recognition): Transcribe audio to text
  • TTS (Text-to-Speech): Convert text to natural speech
  • Interleaved: Mixed audio and text conversation

Requirements

  • A browser with WebGPU support (Chrome/Edge 113+)
  • Enable WebGPU at chrome://flags/#enable-unsafe-webgpu if needed

Model

Uses quantized ONNX models from LiquidAI/LFM2.5-Audio-1.5B-ONNX.

License

Model weights are released under the LFM 1.0 License.