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

Was this helpful?

Speech Synthesis

Send Voice notes, audio files, real-time audio and get transcription, translation or voice response.

1. Speech to Speech

Use Case: Live translation, transcription, Intepreter, Dictation.

Example: Can receive speech in any of the supported languages and respond with the translation speech in other supported languages.

POST /speech

Headers

Content-Type

application/Json

apikey

string

secret

string

Body

Name
Type
Description

speech

{filedatabase64} or {file url}

must be .ogg, .mp3, .wav

inlanguage

string

outlanguage

string

responsetype

string

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

stream

boolean

{
    "speech":{filedatabase64} or {file url}, 
    "inlanguage":"hausa",
    "outputlanguage":"english",
    "responsetype":"voice", 
    "stream":false
}

{
    "status":"success",
    "content":{filedatabase64} or {file url}, //.ogg, .mp3, .wav
    "inlanguage":"hausa",
    "outputlanguage":"english",
    "responsetype":"voice", //Can be voice, image, video or text. If you need voice and text use voice,text.
    "stream":false
}

2. Speech to Text

Use Case: Dictation. Example: Get the written transcription of speech in a language, translate it to other languages and much more.

Name
Value

Content-Type

application/json

apiKey

string

secret

string

Body

Name
Type
Description

speech

{filedatabase64} or {file url}

must be .ogg, .mp3, .wav

inlanguage

string

outputlanguage

string

responsetype

string

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

stream

boolean

{
    "speech":{filedatabase64} or {file url}, //must be .ogg, .mp3, .wav
    "inlanguage":"yoruba",
    "outputlanguage":"igbo",
    "responsetype":"text", //Can be voice, image, video or text. If you need voice and text use voice,text
    "stream":false
}

PreviousConversation ThreadNextText Synthesis

Last updated 9 months ago

Was this helpful?