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

@onepunya/vits-tts

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

@onepunya/vits-tts

```markdown # @onepunya/vits-tts

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source
# @onepunya/vits-tts

`@onepunya/vits-tts` adalah paket npm untuk berinteraksi dengan API VITS TTS, menyediakan fungsionalitas untuk mendapatkan model suara dan melakukan inferensi teks.

## Fitur

- **`vits_model`**: Mendapatkan daftar model suara dari API.
- **`vits_inference`**: Menghasilkan buffer audio dari teks yang diberikan menggunakan model tertentu.

## Instalasi

Instal paket ini dengan npm:

```bash
npm install @onepunya/vits-tts

Penggunaan

Dengan CommonJS (CJS)

const { vits_model, vits_inference } = require('@onepunya/vits-tts');

(async () => {
  try {
    // Mendapatkan daftar model
    const models = await vits_model();
    console.log(models);

    // Mendapatkan buffer audio
    const audioBuffer = await vits_inference('sample text', 'model_id');
    console.log(audioBuffer);
  } catch (error) {
    console.error('Error:', error);
  }
})();

Dengan ECMAScript Module (ESM)

import { vits_model, vits_inference } from '@onepunya/vits-tts';

(async () => {
  try {
    // Mendapatkan daftar model
    const models = await vits_model();
    console.log(models);

    // Mendapatkan buffer audio
    const audioBuffer = await vits_inference('sample text', 'model_id');
    console.log(audioBuffer);
  } catch (error) {
    console.error('Error:', error);
  }
})();

API

vits_model()

Mendapatkan daftar model suara.

Return: Promise<Object[]> - Daftar model suara.

vits_inference(text, model_id)

Menghasilkan buffer audio dari teks dengan model tertentu.

Parameters:

  • text (string): Teks yang akan diubah menjadi audio.
  • model_id (string): ID model yang akan digunakan untuk inferensi.

Return: Promise<Buffer> - Buffer audio hasil inferensi.

License

MIT License.

Follow Me

  • GitHub
  • Instagram
  • Community

FAQs

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