REST API

Warning

the rest_api function is intended create an instance of _rest_api rather than it being done directly

pytts.rest_api(tts: pytts.pyttsx3 | pytts.gctts | pytts.nsss | pytts.sapi | pytts.pico | pytts.gtts | pytts.polly) FastAPI

_summary_

Parameters

tts (pyttsx3 | gctts | nsss | sapi | pico | gtts | polly) – _description_

Returns

_description_

Return type

FastAPI

class pytts._rest_api(tts: pytts.pyttsx3 | pytts.gctts | pytts.nsss | pytts.sapi | pytts.pico | pytts.gtts | pytts.polly)
async speak(info: Request) FileResponse

_summary_

Parameters

info (Request) – _description_

Returns

_description_

Return type

FileResponse

class pytts.rest_client(ipaddr: str, port: int)
speak(text: str, play: bool = True, save: bool = False) None

_summary_

Parameters
  • text (str) – _description_

  • play (bool, optional) – _description_. Defaults to True.

  • save (bool, optional) – _description_. Defaults to False.