Typecast AutoTag is a text preprocessing SDK that converts structured data (phone numbers, dates, times, amounts, etc.) into TTS-friendly formats for voice applications.
Full support for English text preprocessing with proper number reading, currency formatting, and more.
import { autoTag } from 'typecast-autotag';autoTag('Call me at 555-123-4567.', { language: 'en' });// → 'Call me at five five five, one two three, four five six seven.'autoTag('Total is $1,500.', { language: 'en' });// → 'Total is one thousand five hundred dollars.'
Full support for Korean text preprocessing with natural number reading, date/time formatting, and more.
# File-path dependency (recommended while iterating)pnpm add file:../typecast-autotag# Or git URL (the consumer is responsible for running build —# the repo's prepare script does not run microbundle yet)pnpm add github:neosapience/typecast-autotag
The Python binding lives in python-binding/ and wraps the native
C library. Build the C library first, then install the Python
package in editable mode.
from typecast_autotag import auto_tag, manual_tag, auto_tag_with_manualresult = auto_tag('Call 555-123-4567.', language='en')# → 'Call five five five, one two three, four five six seven.'
The Java binding lives in java-binding/ and ships a Maven project
that wraps the native C library through JNI. Build the native library
once, then run mvn install to put the artifact in your local Maven
repository.
import ai.typecast.autotag.TypecastAutotag;String result = TypecastAutotag.autoTag("Call 555-123-4567.", "en");// → "Call five five five, one two three, four five six seven."
Either grab a pre-built native binary from
GitHub Releases,
or build from source:
git clone https://github.com/neosapience/typecast-autotag.gitcd typecast-autotagpnpm installpnpm c-binding:build-all-multiarch# Headers + libraries land under c-binding/build/
#include "typecast_autotag.h"char* result = typecast_autotag_auto_tag( "Call 555-123-4567.", "en");// → "Call five five five, one two three, four five six seven."typecast_autotag_free(result);
Automatically detect and convert patterns in your text:
import { autoTag } from 'typecast-autotag';// Phone numbersautoTag('Call 555-123-4567', { language: 'en' });// → 'Call five five five, one two three, four five six seven'// Dates and timesautoTag('Meeting at 2:30 PM on January 15, 2024', { language: 'en' });// → 'Meeting at two thirty PM on January fifteenth, twenty twenty-four'// CurrencyautoTag('Total: $1,234.56', { language: 'en' });// → 'Total: one thousand two hundred thirty-four dollars and fifty-six cents'
import { manualTag } from 'typecast-autotag';// Name spelling (character by character)manualTag('Hello, name(John).', { language: 'en' });// → 'Hello, J O H N.'
import { autoTagWithManual } from 'typecast-autotag';autoTagWithManual('name(John), call 555-123-4567.', { language: 'en' });// → 'J O H N, call five five five, one two three, four five six seven.'
Manual tags are processed first, then auto-tags are applied to the remaining text.
Perfect for AI Contact Center applications where natural speech is critical:
import { autoTagWithManual } from 'typecast-autotag';// Customer service scriptconst customerName = 'John Smith';const orderNumber = '12345';const deliveryDate = 'January 15, 2024';const supportPhone = '1-800-555-1234';const script = autoTagWithManual(` Hello, name(${customerName}). Your order number digits(${orderNumber}) will be delivered on ${deliveryDate}. For questions, please call ${supportPhone}.`, { language: 'en' });// Output:// "Hello, J O H N S M I T H.// Your order number one two three four five will be delivered on January fifteenth, twenty twenty-four.// For questions, please call one, eight zero zero, five five five, one two three four."