Skip to main content

pycsspeechtts

Python (py) library to use Microsofts Cognitive Services Speech (csspeech) Text to Speech (tts) API. The cryptic name is the combination of the abbrevations shown above.

Usage:

from pycsspeechtts import TTSTranslator
t = TTSTranslator("YOUR API KEY","westeurope")

data = t.speak(text='The default voice is using Microsoft Neural Voice. When using a neural voice, synthesized speech is nearly indistinguishable from the human recordings.')
with open("file1.wav", "wb") as f:
        f.write(data)

data = t.speak('en-gb','Male','I am Max', 'George, Apollo', 'riff-16khz-16bit-mono-pcm', text='I am Max')
with open("file2.wav", "wb") as f:
        f.write(data)

You can also use custom voice by specifying isCustom=True and providing a customEndpoint:

from pycsspeechtts import TTSTranslator
t = TTSTranslator("YOUR API KEY","westeurope", isCustom=True, customEndpoint=MyEndpoint)
data = t.speak(language='en-gb',gender='Male',voiceType="ArchieNeural",text="This is a test for custom voice")

See test.py for more samples. Refer to https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support to find the valid values for language, gender, voicetype and output formats.

Metadata

Release files for pycsspeechtts 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycsspeechtts 1.0.8
File Size Uploaded
pycsspeechtts-1.0.8.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycsspeechtts 1.0.8
File Interpreter ABI Platform
pycsspeechtts-1.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 10.2 kB

Release files / pycsspeechtts-1.0.8.tar.gz

Download URL pycsspeechtts-1.0.8.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
920a1fd13db655153dea92805ae101a39e85eadee8d97ff1452fcbe41ed46036
BLAKE2b-256 checksum
How to use checksums
e9817821aeda210239a9a490e587c9f4f0488f8cb723b46b822268e19b0e822f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release files / pycsspeechtts-1.0.8-py3-none-any.whl

Download URL pycsspeechtts-1.0.8-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce78477905f59b663b284f5d368d03e0aa3d8d2053eeb13ce5ad812affd52100
BLAKE2b-256 checksum
How to use checksums
ada955fb1fdcd35fa020616d056abe51db4544a35f72713c703fbf5d058074e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

1 release file

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page