16-05-2023
L'API n'est disponible qu'une fois que vous avez approvisionné votre compte..
Voix de l'API JSON https://speechgen.io/index.php?r=api/voices.
Deux options de voix-off textuelle sont disponibles via l'API :
1 options - voix off rapide de textes courts.
2 option - définir une tâche de voix-off.
Url pour la variante 1: https://speechgen.io/index.php?r=api/text
Cette option a une limite maximale de 2000 caractères. Et aussi un maximum de 2 changements de voix. Si les limites sont dépassées, vous obtiendrez une erreur (statut = -1)..
$data = [ 'token'=>'SekretKeyInYourProfile', 'email'=>'yourMail@gmail.com', 'voice'=>'John', 'text'=>"Text for text to Speech", 'format'=>'mp3', 'speed'=>1.1, 'pitch'=>0.8, 'emotion'=>'good', ];
'token' - 'SekretKeyInYourProfile' 'email' - 'yourMail@gmail.com' 'voice' - 'Voice' 'text' - 'Text for text to Speech'
'format' - format of the resulting file, by default = mp3, possible values ( 'mp3', 'wav', 'ogg') 'speed' - playback speed, by default 1, (range from 0.1 to 2.0) 'pitch'- voice pitch, by default 0, (range from -20 to 20) 'emotion' - emotion of voice , by default 'good', possible values ( 'good', 'evil', 'neutral').
Not available for all voices, look it here.
{ "id":"4153594", "status":"0", "parts":"5", "parts_done":"2", "duration":"0", "format":"mp3", "error":"", "balans":"3331.2720000314", "cost":"0.06" }
"id" - unique voice ID "status" - current voiceover status. Available from 3 values: 0 - process 1 - completed successfully -1 - error "file" - audio file path, available if status= 1 "error" - error text, in the event of, if status = -1 "parts" - number of voiceovers "parts_done" - number of pieces completed "duration" - audio file duration in seconds, available if status = 1 "format" - audio file format "balans" - limit balance "cost" - voiceover costs. (is increased as the voice parts are dubbed)
Étape 1 : Le texte est envoyé à l'API et un identifiant vocal unique est obtenu (id).
Étape 2: Demander le résultat du doublage en envoyant l'identifiant du doublage (id).
Cette méthode n'a aucune limite et permet de doubler des textes jusqu'à 1 000 000 de caractères. Le doublage s'effectue par ordre de priorité (premier arrivé, premier servi) et peut prendre de 1 à plusieurs minutes, en fonction de la longueur du texte.
$data = [ 'token'=>'SekretKeyInYourProfile', 'email'=>'yourMail@gmail.com', 'voice'=>'John', 'text'=>"Text", 'format'=>'mp3', 'speed'=>1.1, 'pitch'=>0.8, 'emotion'=>'good', ];
'token' - 'SekretKeyInYourProfile' 'email' - 'yourMail@gmail.com' 'voice' - 'Voice' 'text' - 'Text'
'format' - format of the resulting file, by default = mp3, possible values( 'mp3', 'wav', 'ogg') 'speed' - speed, by default 1, (range from 0.1 to 2.0) 'pitch'- voice pitch, by default 0, (range from -20 to 20) 'emotion' - emotional coloration, by default 'good', possible values ( 'good', 'evil', 'neutral').
Not available for all voices, look here.
{ "id":"4153594", "status":"0", "parts":"5", "parts_done":"0", "format":"mp3", "error":"", "balans":"3331.2720000314", "cost":"0.00" }
"id" - unique voice ID "status" - current voiceover status. Available from 2 values: 1 - task added successfully -1 - error "error" - error text, in case of, if status = -1 "parts" - number of voiceovers "parts_done" - number of pieces completed "format" - audio file format "balans" - the balance of the account limits "cost" - voiceover costs. ( is increased as the voice parts are dubbed)
Step 2. Après la création d'une tâche et l'obtention d'un identifiant (id), une requête doit être envoyée à l'adresse suivante https://speechgen.io/index.php?r=api/result, pour connaître le résultat.
$data = [ 'token'=>'SekretKeyInYourProfile', 'email'=>'yourMail@gmail.com', 'id'=>4153594, ];
'token' - SekretKeyInYourProfile 'email' - yourMail@gmail.com 'id' - Unique voice ID obtained in step 1
{ "id":"4153594", "status":"0", "file":"result.mp3", "cuts":["result_1.mp3","result_2.mp3",...], "parts":"5", "parts_done":"0", "format":"mp3", "error":"", "balans":"3331.2720000314", "cost":"0.00" }
"id" - unique voice ID "status" - current voiceover status. Available from 3 values: 0 - in the midst of 1 - completed successfully -1 - error "file" - audio file path, available if status = 1 "error" - error text, in case of, if status = -1 "parts" - number of voiceovers "parts_done" - number of pieces completed "duration" - audio file duration in seconds, available if status = 1 "format" - audio file format "balans" - the balance of the account limits "cost" - voiceover costs. ( is increased as the voice parts are dubbed) "cuts" - Array of fragments, if the "cut" tag is used in the text