# adanjz-googletts

> A simple Node.js module that converts a given text into speech using the Google Cloud Text-to-Speech API.

Latest version **1.0.1** (published 2023-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install adanjz-googletts
pnpm add adanjz-googletts
yarn add adanjz-googletts
bun add adanjz-googletts
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-10-11 |
| First published | 2023-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | adanjz |
| Maintainers | adanjz |

## Links

- npm: https://www.npmjs.com/package/adanjz-googletts
- Repository: https://github.com/adanzweig/nodejs-googletts
- Issues: https://github.com/adanzweig/nodejs-googletts/issues
- npm.io page: https://npm.io/package/adanjz-googletts

## Dependencies (2)

- [fs](https://npm.io/package/fs.md) ^0.0.1-security
- [@google-cloud/text-to-speech](https://npm.io/package/@google-cloud/text-to-speech.md) ^5.0.1

## Recent versions

- 1.0.1 (latest) — 2023-10-11
- 1.0.0 — 2023-10-10

## README

# Google Cloud Text-to-Speech API Wrapper

A simple Node.js module that converts a given text into speech using the Google Cloud Text-to-Speech API.

## Prerequisites

1. [Node.js](https://nodejs.org/) installed.
2. A Google Cloud account and a service account key with Text-to-Speech permissions.
3. Set up the Google Cloud SDK on your local machine.

## Installation

1. Clone this repository:

```
git clone https://github.com/adanzweig/nodejs-googletts.git
```

2. Navigate to the project directory:

```
cd nodejs-googletts
```

3. Install the dependencies:

```
npm install
```

4. Set up your Google Cloud credentials:

Export your service account key:

```
export GOOGLE_APPLICATION_CREDENTIALS="<path_to_service_account_key.json>"
```

Replace `<path_to_service_account_key.json>` with the path to your Google Cloud service account key.

## Usage

Here's how to use the `transformTextToSpeachWithGoogle` function:

```javascript
const { transformTextToSpeachWithGoogle } = require('./path_to_your_file');

(async () => {
    const outputFile = await transformTextToSpeachWithGoogle('Your text here', 'output.mp3');
    console.log(`Audio saved to: ${outputFile}`);
})();
```

Replace `'Your text here'` with the text you want to convert and `'output.mp3'` with your desired output file name.

## Contributing

Contributions are welcome. Please submit a pull request or open an issue to discuss the changes you'd like to make.

---
_Source: https://npm.io/package/adanjz-googletts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
