Prüfen, ob ein Satz toxisch ist Sie haben Nutzertext und brauchen ein Ja/Nein-Signal vor der Anzeige.
Eingabe
{
"text": "This product is absolutely amazing"
}Aufruf
curl Python Node
curl -X POST https://api.brainiall.com/v1/nlp/toxicity \
-H "Authorization: Bearer $BRAINIALL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"This product is absolutely amazing"}'Beispielantwort
{
"label": "not_toxic",
"score": 0.001
}Leerer Text wird abgelehnt. Senden Sie ein nicht leeres Feld text und versuchen Sie es erneut.
Einen Satz sprechen Sie haben Wörter und brauchen Audio zum Abspielen oder Speichern.
Eingabe
{
"text": "Hello, welcome.",
"voice": "brainiall-aria"
}Aufruf
curl Python Node
curl -X POST https://api.brainiall.com/v1/tts/synthesize \
-H "Authorization: Bearer $BRAINIALL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello, welcome.","voice":"brainiall-aria"}' \
--output speech.wavBeispielantwort
{
"content_type": "audio/wav",
"note": "Binary audio. Save the body to speech.wav."
}Leerer Text wird abgelehnt. Senden Sie ein nicht leeres Feld text. Die Stimme muss eine Katalog-ID aus GET /v1/tts/voices sein.
Einen gesprochenen Satz bewerten Jemand hat einen Satz gesprochen. Sie brauchen eine Bewertung gegen den Referenztext.
Eingabe
{
"audio": "<base64-wav>",
"text": "Hello world"
}Aufruf
curl Python Node
curl -X POST https://api.brainiall.com/v1/pronunciation/assess/base64 \
-H "Authorization: Bearer $BRAINIALL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"audio":"<base64-wav>","text":"Hello world"}'Beispielantwort
{
"overallScore": 86,
"sentenceScore": 84,
"decodedTranscript": "Hello world",
"words": [
{ "word": "Hello", "score": 90 },
{ "word": "world", "score": 82 }
]
}Ohne Audio wird abgelehnt. Senden Sie Base64-Audio im Feld audio plus den Referenztext.