Normalize Text
curl --request POST \
--url https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/ \
--header 'Content-Type: application/json' \
--header 'PersoPlatform-APIKey: <api-key>' \
--data '
{
"text": "Hello 안녕하세요",
"locale": "ko"
}
'import requests
url = "https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/"
payload = {
"text": "Hello 안녕하세요",
"locale": "ko"
}
headers = {
"PersoPlatform-APIKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'PersoPlatform-APIKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: 'Hello 안녕하세요', locale: 'ko'})
};
fetch('https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => 'Hello 안녕하세요',
'locale' => 'ko'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PersoPlatform-APIKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/"
payload := strings.NewReader("{\n \"text\": \"Hello 안녕하세요\",\n \"locale\": \"ko\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("PersoPlatform-APIKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/")
.header("PersoPlatform-APIKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Hello 안녕하세요\",\n \"locale\": \"ko\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["PersoPlatform-APIKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"Hello 안녕하세요\",\n \"locale\": \"ko\"\n}"
response = http.request(request)
puts response.read_body{
"normalized_text": "<string>"
}Session Operations
Normalize Text
Apply text normalization rules to prepare text for TTS.
What It Does
Text normalization converts text into a format optimized for speech synthesis:
- Expands abbreviations (e.g., “Dr.” → “Doctor”)
- Converts numbers to words (e.g., “123” → “one hundred twenty-three”)
- Handles special characters and symbols
- Applies locale-specific pronunciation rules
Request Parameters
| Parameter | Required | Description |
|---|---|---|
text | Yes | The text to normalize |
locale | No | Target locale for normalization (e.g., ko, en, ja) |
Example
Select “NormalizeTextRequest” from the Examples dropdown to see the request format.
POST
/
api
/
v1
/
settings
/
text_normalization_config
/
{config_id}
/
normalize
/
Normalize Text
curl --request POST \
--url https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/ \
--header 'Content-Type: application/json' \
--header 'PersoPlatform-APIKey: <api-key>' \
--data '
{
"text": "Hello 안녕하세요",
"locale": "ko"
}
'import requests
url = "https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/"
payload = {
"text": "Hello 안녕하세요",
"locale": "ko"
}
headers = {
"PersoPlatform-APIKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'PersoPlatform-APIKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: 'Hello 안녕하세요', locale: 'ko'})
};
fetch('https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => 'Hello 안녕하세요',
'locale' => 'ko'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"PersoPlatform-APIKey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/"
payload := strings.NewReader("{\n \"text\": \"Hello 안녕하세요\",\n \"locale\": \"ko\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("PersoPlatform-APIKey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/")
.header("PersoPlatform-APIKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Hello 안녕하세요\",\n \"locale\": \"ko\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.perso.ai/api/v1/settings/text_normalization_config/{config_id}/normalize/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["PersoPlatform-APIKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"Hello 안녕하세요\",\n \"locale\": \"ko\"\n}"
response = http.request(request)
puts response.read_body{
"normalized_text": "<string>"
}Authorizations
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Raw text to normalize. The config's regex rules are applied in order (lowest first) to rewrite patterns into spoken-form text (e.g. 20℉ → 화씨 20도).
Minimum string length:
1Locale code (e.g. ko-KR). When set, locale-agnostic rules plus rules matching this locale run; when omitted, only locale-agnostic rules run.

