Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ai-tools-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ai-tools-sdk

AI Tools SDK

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Install

npm install ai-tools-sdk

OR

yarn add ai-tools-sdk

Usage

import AITools from 'ai-tools-sdk';

const App = () => {

  // This converts spoken source speech to text.
  // mode_id_stt = model id for stt
  // base64 = base64 text of audio
  // source_lang_code = short code of spoken language
  const text = await AITools.stt(model_id_stt, base64, source_lang_code);


  // This will translate the text to target language of model passed.
  // model_id_translation = model id of spoken langugage to english translator
  // text = text to be translated
  const translated_txt = await AITools.translate(model_id_translation, text);


  // This gives back number from speech.
  // model_id_stt = model id of spoken langugage
  // base64 = base64 text of audio
  // source_lang_code = short code of spoken language like 'en' for english
  // model_id_translation = model id of spoken langugage to english translator
  const number = await AITools.stn(model_id_stt, base64, source_lang_code, model_id_translation);
  // The stn (Speech to Number) function first converts the speech to its native language text then that text is translated to english and then english words are converted to numbers.
  // Example Flow: STT -> 'एक दो तीन' -> TRANSLATE -> 'one two three' -> STN -> '123'


  // This returns a base64 audio text that can be played in any audio component.
  // model_id_tts = model id for tts
  // text = text to be converted to speech
  // gender = for voice ('male' / 'female')
  const res = await AITools.tts(model_id_tts, text, gender);
  let audio = new Audio(res);
  audio.play();

};

License

MIT

Keywords

FAQs

Package last updated on 03 Jul 2023

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