PHPackages                             php-cpm/edge-tts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-cpm/edge-tts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

php-cpm/edge-tts
================

Edge TTS is a PHP package that allows access to the online text-to-speech service used by Microsoft Edge without the need for Microsoft Edge, Windows, or an API key.

1.3.1(1y ago)028GPL-3.0+PHPPHP &gt;=7.4

Since Feb 11Pushed 10mo agoCompare

[ Source](https://github.com/php-cpm/edge-tts-php)[ Packagist](https://packagist.org/packages/php-cpm/edge-tts)[ RSS](/packages/php-cpm-edge-tts/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

Edge TTS
========

[](#edge-tts)

Overview
--------

[](#overview)

**Edge TTS** is a powerful Text-to-Speech (TTS) package for PHP that leverages Microsoft's Edge capabilities. This package allows you to synthesize speech from text and manage voice options easily through a command-line interface (CLI).

Features
--------

[](#features)

- **Text-to-Speech**: Convert text into natural-sounding speech using Microsoft Edge's TTS capabilities.
- **Multiple Voices**: Access a variety of voices to suit your project's needs.
- **Audio Export Options**: Export synthesized audio in different formats (raw, base64, or directly to a file).
- **Command-Line Interface**: Use a simple CLI for easy access to functionality.
- **Easy Integration**: Modular structure allows for easy inclusion in existing PHP projects.

Command-Line Interface: Use a simple CLI for easy access to functionality. Easy Integration: Modular structure allows for easy inclusion in existing PHP projects.

Installation
------------

[](#installation)

You can install Edge TTS via Composer. Run the following command in your terminal:

```
composer require php-cpm/edge-tts
```

this package is a fork of the original [afaya/edge-tts](https://github.com/andresayac/edge-tts-php) package, with some improvements and fixes.

we downgraded the dependencies to be compatible from php 8.1+ to php 7.4+ while keeping the original functionality.

Usage
-----

[](#usage)

Command-Line Interface To synthesize speech from text, use the following command:

```
php .\vendor\bin\edge-tts edge-tts:synthesize --text "Hello, world!"
```

To list available voices, run:

```
php .\vendor\bin\edge-tts edge-tts:voice-list
```

Integration into Your Project
-----------------------------

[](#integration-into-your-project)

To use Edge TTS in your PHP project, include the autoload file:

```
