Safi Docs
  • Introduction
  • Authentication
  • SDK & Packages
  • Voices & Languages
  • Simple Messaging
  • Conversation Thread
  • Speech Synthesis
  • Text Synthesis
Powered by GitBook
On this page
  • 1. Text to Speech
  • 2. Text to Text

Was this helpful?

Text Synthesis

This takes in text content and gives out either text or voice depending on the request. Look at 1 & 2.

1. Text to Speech

Use Case: Used for creating voice overs, voice translation to other languages and much more.

POST /text

Headers

Name
Value

Content-Type

application/json

apikey

string

secret

string

Body

Name
Type
Description

text

string

voice

string

responsetype

string

Can be voice, image, video or text. If you need voice and text use voice,text.

inlanguage

string

input language

outlanguage

string

Ignore if you want to get same language

speed

number

0-100. 50 is usually moderate. Its optional. "stream":false

stream

boolean

{
    "text":"Good morning Here",
    "voice":"khadie",
    "responsetype":"voice", //Can be voice, image, video or text. If you need voice and text use voice,text.
    "inlanguage":"hausa",
    "outlanguage":"igbo", //Ignore if you want to get same language
    "speed":50, //0-100. 50 is usually moderate. Its optional.
    "stream":false
}
{
  "error": "Invalid request"
}

2. Text to Text

Use Case: For translation, sentence correction and more.

POST /text

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

name

string

Name of the user

age

number

Age of the user

Response

{
  "id": 1,
  "name": "John",
  "age": 30
}
{
  "error": "Invalid request"
}
PreviousSpeech Synthesis

Last updated 9 months ago

Was this helpful?