承接 thuanvp012van/gtts 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

thuanvp012van/gtts

最新稳定版本:v1.2.0

Composer 安装命令:

composer require thuanvp012van/gtts

包简介

Google Text-to-Speech for php

README 文档

README

Install

composer require thuanvp012van/gtts

Usage

  1. Use with php

    use Thuanvp012van\GTTS\GTTS;
    use Thuanvp012van\GTTS\Language;
    
    require './vendor/autoload.php';
    
    $gtts = new GTTS('Xin chào mọi người', Language::VI); // or $gtts = (new GTTS('Xin chào mọi người'))->autoDetection(true);
    $gtts->save('helloworld.mp3');
  2. Use with command-line

    php ./vendor/bin/gtts languages # Show all languages
    php ./vendor/bin/gtts save --file=helloworld.mp3 --language=vi 'Xin chào mọi người' # Convert text to speech.

    OR

    php ./vendor/bin/gtts save --file=helloworld.mp3 --auto-detection 'Xin chào mọi người' # Automatic language detection.

Methods

  • text(string $text): Set text.
  • getText(): Get text.
  • lang(\Thuanvp012van\GTTS\Language $lang): Set language.
  • getLang(): Get language.
  • autoDetection(bool $autoDetection): Set auto detection.
  • isAutoDetection(): Check is auto detection.
  • topLevelDomain(string $tld): Set top level domain.
  • getLevelDomain(): Get top level domain.
  • slowSpeed(): Set slow reading speed.
  • normalSpeed(): Set normal reading speed.
  • isSlowSpeed(): Check is slow reading speed.
  • isNormalSpeed(): Check is normal reading speed.
  • save(string $fileName): Save speech as file.
  • stream(): Get parts of speech.

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-04-24