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

@aws-amplify/predictions

Package Overview
Dependencies
Maintainers
0
Versions
1842
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/predictions

Machine learning category of aws-amplify

  • 6.1.34
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
367K
decreased by-0.38%
Maintainers
0
Weekly downloads
 
Created

What is @aws-amplify/predictions?

@aws-amplify/predictions is a part of the AWS Amplify library that provides machine learning capabilities to your web and mobile applications. It allows you to easily integrate features like text translation, speech generation, text recognition, and more using AWS services.

What are @aws-amplify/predictions's main functionalities?

Text Translation

This feature allows you to translate text from one language to another. In the code sample, the text 'Hello, how are you?' is translated from English to Spanish.

const { Predictions } = require('@aws-amplify/predictions');

Predictions.convert({
  translateText: {
    source: {
      text: "Hello, how are you?",
      language: "en"
    },
    targetLanguage: "es"
  }
}).then(result => {
  console.log(result.text);
}).catch(err => {
  console.error(err);
});

Speech Generation

This feature converts text into speech. The code sample demonstrates converting the text 'Hello, how are you?' into an audio stream.

const { Predictions } = require('@aws-amplify/predictions');

Predictions.convert({
  textToSpeech: {
    source: {
      text: "Hello, how are you?"
    }
  }
}).then(result => {
  console.log(result.audioStream);
}).catch(err => {
  console.error(err);
});

Text Recognition

This feature allows you to recognize text from an image. The code sample shows how to identify text from an image located at 'path/to/image.jpg'.

const { Predictions } = require('@aws-amplify/predictions');

Predictions.identify({
  text: {
    source: {
      key: "path/to/image.jpg"
    }
  }
}).then(result => {
  console.log(result.text);
}).catch(err => {
  console.error(err);
});

Other packages similar to @aws-amplify/predictions

FAQs

Package last updated on 20 Nov 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