ibm-text-to-speech
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Import

Javascript

const { IBMWatson } = require('ibm-text-to-speech')

Typescript

import { IBMWatson } from 'ibm-text-to-speech'

Usage

 const watson = new IBMWatson({
  apiKey: process.env.IBM_WATSON_API_KEY as string,
  serviceInstanceUrl: process.env.IBM_WATSON_SERVICE_INSTANCE_URL as string
})

try {
  await watson.textToSpeech({
    text: 'Just some text here.',
    voice: 'en-US_MichaelV3Voice',
    outputFile: './text_to_speech.wav',
  })
} catch (e) {
  console.error(e)
}

Package Sidebar

Install

npm i ibm-text-to-speech

Weekly Downloads

10

Version

1.0.1

License

MIT

Unpacked Size

5.65 kB

Total Files

6

Last publish

Collaborators

  • florinrelea