A low-latency Go API for generating and detecting dog vocalizations. It runs as a statically linked binary in a small Docker container.
Website: bark.plz.pet
GET /bark
Generates a vocalization using procedural phonetic combinations.
Example response:
{
"generation_time": "14.625µs",
"bark": "woooof",
"family": "woof",
"language": "en"
}GET /isbark?text={input}
Checks whether the entire input is a dog sound, including stretched spellings like wooooffff.
Example response:
{
"detection_time": "18.210µs",
"input": "woof",
"is_bark": true,
"bark_percentage": "100.0%",
"squeezed_form": "wof",
"family": "woof",
"match_type": "exact",
"language": "en"
}GET /barklike?text={input}
Recognizes barks and other dog sounds in short messages.
GET /askbark?text={question}
Returns a deterministic answer in English.
Add lang=fr (or another supported tag) to /bark, /isbark, or /barklike. These endpoints default to English. Detection also accepts lang=auto to find the language. GET /languages lists the supported tags.
The API reads config.json from the root directory. If missing, it uses default values. For example:
{
"port": "8000",
"generate_endpoint": "/bark",
"detect_endpoint": "/isbark"
}Requires Go 1.26.3 or later.
go run .
go test ./...