Simple Google Tts Api Class

Related tags

Third Party APIs tts
Overview

Tts

Simple Google Tts Api Class

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Features

  • Set Api Key, Text, Lang Code, Voice Name, Encoding, Pitch, Rate, Save Path
  • Fast, Simple and Light

Install

run the following command directly.

$ composer require omerfdmrl/tts

Simple Usage

include 'vendor/autoload.php';

use Omerfdmrl\Tts\Tts;

$tts = new Tts;

// Set Google Api Code
$tts->setApi('Api_Code');

// Set Text
$tts->setText('Hello World!');

// Send request to Google and save voice
$tts->get();

Advanced Usage

include 'vendor/autoload.php';

use Omerfdmrl\Tts\Tts;

$tts = new Tts;

// Set Google Api Code
$tts->setApi('Api_Code');

// Set Text
$tts->setText('Hello World!');

// Set Save Path
// Default is ./tts.mp3
$tts->setSavePath('tts.mp3');

// Set Language Code
// Default is en-US
$tts->setLanguageCode('en-US');

// Set Voice Name
// Default is en-US-Wavenet-F
$tts->setVoiceName('en-US-Wavenet-F');

// Set Encoding Type
// Default is MP3
$tts->setEncoding('MP3');

// Set Pitch
// Default is 0.00
$tts->setPitch(0.00);

// Set Speaking Rate
// Default is 1.00
$tts->setSpeakingRate(1.00);

// Send request to Google and save voice
$tts->get();

// Get error if exist
echo $tts->error();

Docs

Documentation page: Security Docs

Licence

MIT Licence

Contributing

  1. Fork it ( https://github.com/omerfdmrl/tts/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • omerfdmrl Ömer Faruk Demirel - creator, maintainer
You might also like...
A Laravel package to retrieve pageviews and other data from Google Analytics
A Laravel package to retrieve pageviews and other data from Google Analytics

Retrieve data from Google Analytics Using this package you can easily retrieve data from Google Analytics. Here are a few examples of the provided met

Adds a specific header to every response to disable Google's usage of your site in it's FLoC tracking method.

Go Unfloc Yourself Description A bundle for Symfony 5 that adds a Permissions-Policy header in all the responses to prevent the use of new Google's "F

A Class Library enabling Asterisk ARI functionality for PHP

phpari A Class Library enabling Asterisk ARI functionality for PHP Dependencies These are the minimum requirements to have phpari installed on your se

Google VerifiedSMS Laravel Package

Google VerifiedSMS Laravel Package This is a laravel package developed for google business communication api and verified SMS API. Before we commence

🌏 Discover Random Destinations & Cities explored by people on Google Street View.
🌏 Discover Random Destinations & Cities explored by people on Google Street View.

Random Street View on Steroids 👀 Welcome to the streetviewhub.com codebase. Here lies all the code with all the awesomeness and 🐛 s. Have some ideas

Paperwork - OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep
Paperwork - OpenSource note-taking & archiving alternative to Evernote, Microsoft OneNote & Google Keep

Paperwork Paperwork is an open-source, self-hosted alternative to services like Evernote®, Microsoft OneNote® or Google Keep® iframe src="https://pla

It's a PHP Application to simplify working with Google Sheets SDK for php.

About GoogleSheetsPHP It's a PHP Application to simplify working with Google Sheets SDK for php. Note: i used Slim 3 to construct the application but

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

Google Cloud Profiler for PHP

Google Cloud Profiler for PHP Idiomatic PHP client for Google Cloud Profiler. API documentation NOTE: This repository is part of Google Cloud PHP. Any

Releases(v2.1.11)
Owner
Ömer Faruk Demirel
Red Hat Boy
Ömer Faruk Demirel
PHP package to manage google-api interactions

Google-api-client PHP package to manage google-api interactions Supports: Google Drive API Google Spreadsheet API Installation composer require obrio-

OBRIO 3 Apr 28, 2022
A PHP class for querying the Twitter API and rendering tweets as an HTML list

TweetPHP A PHP class for querying the Twitter API and rendering tweets as an HTML list. Features Works with Twitter API v1.1 Tweets are cached to avoi

Jonathan Nicol 151 Nov 25, 2022
🌐 Free Google Translate API PHP Package. Translates totally free of charge.

Google Translate PHP Free Google Translate API PHP Package. Translates totally free of charge. Installation Basic Usage Advanced Usage Language Detect

Levan Velijanashvili 1.5k Dec 31, 2022
Google PHP API Client Services

Google PHP API Client Services

Google APIs 1.1k Dec 22, 2022
Google Drive Api Wrapper by PHP

GoogleDrive Api Wrapper usage at first you need to create oauth client on google cloud platform. so go to the your google console dashboard and create

Arash Abedi 2 Mar 24, 2022
PHP Telegram Bot based on the official Telegram Bot API with iTelegram Class.

iTelegram PHP Telegram Bot based on the official Telegram Bot API Bots: An introduction for developers Bots are special Telegram accounts designed to

iNeoTeam | آی نئو 5 Nov 9, 2022
An elegant wrapper around Google Vision API

STILL UNDER DEVELOPMENT - DO NOT USE IN PRODUCTION Requires PHP 8.0+ For feedback, please contact me. This package provides an elegant wrapper around

Ahmad Mayahi 24 Nov 20, 2022
Google Translator Api Wrapper For Php Developers.

Google Translator Api Wrapper For Php Developers.

Roldex Stark 2 Oct 12, 2022
Attempting to create an intelligent mock of the Google API PHP Client for unit and functional testing

google-api-php-client-mock A small scale intelligent mock of the Google API PHP Client for unit and functional testing. Overview This is intended to m

SIL International 0 Jan 4, 2022
A versatile PHP Library for Google PageSpeed Insights

PhpInsights An easy-to-use API Wrapper for Googles PageSpeed Insights. The JSON response is mapped to objects for an headache-free usage. Installation

Daniel Sentker 110 Dec 28, 2022