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

text-to-speech-api

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

text-to-speech-api - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

8

index.js

@@ -1,2 +0,2 @@

class TextToVoice {
class TextToSpeech {
/**

@@ -37,8 +37,8 @@ * Convert text to speech.

// Export the TextToVoice class
// Export the TextToSpeech class
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = TextToVoice;
module.exports = TextToSpeech;
} else if (typeof window !== 'undefined') {
// Avoid redeclaration
window.TextToVoice = window.TextToVoice || TextToVoice;
window.TextToSpeech = window.TextToSpeech || TextToSpeech;
}
{
"name": "text-to-speech-api",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple NPM package to convert text to voice using native JavaScript API.",

@@ -5,0 +5,0 @@ "main": "index.js",

# TextToVoice
# TextToSpeech
`TextToVoice API` is a lightweight JavaScript class that provides an easy way to convert text to speech using the native Web Speech API. It allows customization of voice selection, speech rate, and pitch, making it a versatile tool for web applications that require voice synthesis capabilities.
`TextToSpeech API` is a lightweight JavaScript class that provides an easy way to convert text to speech using the native Web Speech API. It allows customization of voice selection, speech rate, and pitch, making it a versatile tool for web applications that require voice synthesis capabilities.

@@ -38,3 +38,3 @@ ## Features

```javascript
const TextToVoice = require('text-to-speech-api');
const TextToSpeech = require('text-to-speech-api');
```

@@ -46,7 +46,7 @@

To convert text to speech, simply call the `convert` method of the `TextToVoice` class:
To convert text to speech, simply call the `convert` method of the `TextToSpeech` class:
```javascript
const text = "Hello, this is a text to voice conversion!";
TextToVoice.convert(text);
TextToSpeech.convert(text);
```

@@ -62,3 +62,3 @@

TextToVoice.convert(text, voiceName, 1.2, 1.0);
TextToSpeech.convert(text, voiceName, 1.2, 1.0);
```

@@ -76,3 +76,3 @@

```javascript
TextToVoice.convert("This is a faster voice!", null, 1.5, 1);
TextToSpeech.convert("This is a faster voice!", null, 1.5, 1);
```

@@ -86,3 +86,3 @@

try {
TextToVoice.convert("Hello, world!");
TextToSpeech.convert("Hello, world!");
} catch (error) {

@@ -95,3 +95,3 @@ console.error(error.message);

Here is a simple example of how to use `TextToVoice` in an HTML file:
Here is a simple example of how to use `TextToSpeech` in an HTML file:

@@ -114,3 +114,3 @@ ```html

const text = "Hello, this is a text to voice conversion!";
TextToVoice.convert(text);
TextToSpeech.convert(text);
});

@@ -122,2 +122,14 @@ </script>

## Changelog
### [1.0.1]
#### Updated
- Enhanced user experience.
### [1.0.0]
#### Initial Release
- Released the `TextToSpeech` class with basic functionality to convert text to speech using the native Web Speech API.
## License

@@ -124,0 +136,0 @@

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