New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

web-ai-toolkit

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-ai-toolkit

AI powered features on the web made easy

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
increased by42.86%
Maintainers
0
Weekly downloads
 
Created
Source

Web AI Toolkit

Alpha Version: v0.0.1

The Web AI Toolkit simplifies the integration of AI features, such as OCR and audio file transcription, into your application. It ensures optimal performance by running all AI workloads locally, leveraging WebGPU and WASM technologies.

Installation

To install the Web AI Toolkit, run:

npm install web-ai-toolkit

Available Functions

Function NameParameterTypeDefault Value
transcribeAudioFileaudioFileBlob-
model"tiny" | "base""tiny"
timestampsbooleanfalse
languagestring"en-US"
textToSpeechtextstring-
summarizetextstring-
ocrimageBlob-

Technical Details

The Web AI Toolkit utilizes the transformers.js project to run AI workloads. All AI processing is performed locally on the device, ensuring data privacy and reducing latency.

Usage

Here are examples of how to use each function:

Transcribe Audio File

import { transcribeAudioFile } from 'web-ai-toolkit';

const audioFile = ...; // Your audio file Blob
const transcription = await transcribeAudioFile(audioFile, "base", true, "en-US");
console.log(transcription);

Text to Speech

import { textToSpeech } from 'web-ai-toolkit';

const text = "Hello, world!";
const audio = await textToSpeech(text);
console.log(audio);

Summarize Text

import { summarize } from 'web-ai-toolkit';

const text = "Long text to be summarized...";
const summary = await summarize(text);
console.log(summary);

Optical Character Recognition (OCR)

import { ocr } from 'web-ai-toolkit';

const image = ...; // Your image Blob
const text = await ocr(image);
console.log(text);

Contribution

We welcome contributions to the Web AI Toolkit. Please fork the repository and submit a pull request with your changes. For major changes, please open an issue first to discuss what you would like to change.

License

The Web AI Toolkit is licensed under the MIT License. See the LICENSE file for more details.

Contact

For questions or support, please open an issue here on GitHub


Thank you for using the Web AI Toolkit! We hope it makes integrating AI into your applications easier and more efficient.

FAQs

Package last updated on 03 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc