Google releases Gemma 2 2B, ShieldGemma and Gemma Scope
β’
59
Hey! Oh that's awesome - great work! Feel free to adapt any code/logic of mine as you'd like!
import { KokoroTTS } from "kokoro-js";
const tts = await KokoroTTS.from_pretrained(
"onnx-community/Kokoro-82M-ONNX",
{ dtype: "q8" }, // fp32, fp16, q8, q4, q4f16
);
const text = "Life is like a box of chocolates. You never know what you're gonna get.";
const audio = await tts.generate(text,
{ voice: "af_sky" }, // See `tts.list_voices()`
);
audio.save("audio.wav");
For this demo, ~150MB if using WebGPU and ~120MB if using WASM.
npm i @huggingface/transformers
.We have Transformers.js, the JavaScript/WASM/WebGPU port of the python library, which supports ~100 different architectures.
Docs: https://huggingface.co/docs/transformers.js
Repo: http://github.com/xenova/transformers.js
Is that the kind of thing you're looking for? :)
Note: Since the API is experimental, you will need to install Chrome Dev/Canary version 127 or higher, and enable a few flags to get it working (see blog post for more detailed instructions)
windowβ.ai
feature is going to change the web forever! π€― It allows you to run Gemini Nano, a powerful 3.25B parameter LLM, 100% locally in your browser!