innovination/elevenlabs 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

innovination/elevenlabs

最新稳定版本:1.0.2

Composer 安装命令:

composer require innovination/elevenlabs

包简介

A simple package to convert text to audio using Elevenlabs API and store it in the storage.

README 文档

README

This Composer package allows you to convert text into audio using the ElevenLabs API.

Installation

To install this package, you can use Composer. Run the following command in your project directory:

composer require innovination/elevenlabs

Usage

To use this package, follow these steps:

  1. Import the package into your PHP file:
use Innovination\Elevenlabs;
  1. Create an instance of the Elevenlabs class:
$elevenlabs = new ElevenLabs();
  1. Add ElevenLabs API key to your .env file
XI_API_KEY='your-api-key'
  1. Convert text to audio:
//Required
$elevenlabs->voice_id = 'voice-id-on-elevenlabs';
$elevenlabs->text = "Hello, world!";
//Optional
$elevenlabs->file_prefix = "prefix"; // default is audio
$elevenlabs->path = "folder-name"; //default folder is audio
$audioFile = $elevenlabs->generateAudio();

The generateAudio method will return the path to the generated audio file along with status as sucess or error

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-21