Skip to content

respeecher/marketplace_tts_python_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marketplace Python TTS API client

The official Python API client for Respeecher Marketplace TTS.

TTS Docs

Installation

Marketplace Python TTS API client requires Python 3.11 or higher.

pip install .

Poetry

Marketplace Python TTS API client recommends Poetry 1.7.11 or higher.

poetry shell
poetry install

Usage example

from respeecher_tts import RespeecherTTS
import soundfile as sf

tts = RespeecherTTS(api_key="<Respeecher_API_Token>", verbose=True)

print("All Voices:", [voice.name for voice in tts.voices])
print(
    f"Narration Styles for {tts.voices[0].name} voice:",
    [narration_style.name for narration_style in tts.voices[0].narration_styles],
)

au, sr = tts.synthesize(
    "In the quiet morning, the gentle breeze whispered through the leaves, bringing with it the promise of a new day.",
    voice="Roman",
    narration_style="Mellow, Raspy, Neutral",
)

# sf.write will reduce the bit depth to 16-bit by default, to avoid this we specify 'PCM_24'
sf.write("tts_sample.wav", au, sr, 'PCM_24')

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages