npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@neosapience/typecast-autotag

v1.13.0

Published

Text preprocessing SDK for Typecast TTS API - automatically converts phone numbers, dates, names, and other patterns into speech-friendly formats for AICC environments

Readme

Typecast Autotag

Text preprocessing SDK for TTS — convert text to speech-friendly format

Node.js TypeScript Zero Dependencies License

FeaturesInstallationQuick StartAPITags

한국어 문서


Language Support

The JavaScript and browser package accepts every SSFM v3.0 TTS language:

| Language tier | Status | Language codes | | --------------------------------- | ------------------------------- | --------------------- | | Korean (한국어) | ✅ Full patterns | ko, kor | | English | ✅ Full patterns | en, eng | | Japanese (日本語) | ✅ Core TTS patterns | ja, jpn | | Simplified Chinese (简体中文) | ✅ Core TTS patterns | zh, zho | | Traditional Han-script voices | ✅ Core TTS patterns | zh-TW, nan, yue | | Other SSFM v3.0 languages | ✅ Common TTS patterns (31) | ISO 639-3 codes below |

Official SSFM v3.0 language codes (37): ara, ben, bul, ces, dan, deu, ell, eng, fin, fra, hin, hrv, hun, ind, ita, jpn, kor, msa, nan, nld, nor, pan, pol, por, ron, rus, slk, spa, swe, tam, tgl, tha, tur, ukr, vie, yue, zho.

For the 31 languages without a dedicated rule module, auto-tagging handles datetime, date, time, money, phone, percentage, range, unit, serial, and number patterns. It uses locale-specific date order, month names, currency names, decimal separators, 12/24-hour conventions, and common native digit scripts. Manual tags add name, digits, and account. Ambiguous numbers joined to grammatical ordinal or case suffixes remain unchanged so a cardinal rewrite does not damage pronunciation. The nan and yue codes reuse the Traditional Chinese pattern pipeline while retaining their own TTS voice selection.

All 37 official codes are currently exposed by the JavaScript and browser package. The native C, Python, and Java bindings retain their existing Korean and English entry points.

Supported Environments

Development Languages

| Language | Version | Package | | ----------- | ------- | ------------------------------------------ | | Node.js | ≥18 | @neosapience/typecast-autotag (npm/pnpm) | | Browser | Modern | @neosapience/typecast-autotag (ESM/UMD) | | Python | ≥3.8 | typecast-autotag (pip) | | Java | ≥8 | typecast-autotag (Maven) | | C/C++ | Any | Native library |

Server Platforms

| Platform | Status | | ----------- | ----------------------------------------------------------------- | | Linux | ✅ Supported (CentOS 6.9+, Amazon Linux 2+, Ubuntu, Debian, etc.) | | macOS | ✅ Supported (Intel & Apple Silicon) | | Windows | ✅ Supported (Windows 10+) |

Server Architectures

| Architecture | Status | | ---------------------- | ------------ | | x86_64 (AMD64) | ✅ Supported | | x86 (32-bit) | ✅ Supported | | arm64 (AArch64) | ✅ Supported | | armv7 (32-bit ARM) | ✅ Supported |


Transform numbers and language-specific patterns into natural speech text. Built for Typecast TTS API and AICC (AI Contact Center) environments.

import { autoTag } from '@neosapience/typecast-autotag';

// English auto-tagging
autoTag('Call me at 555-123-4567 tomorrow.', { language: 'en' });
// → 'Call me at five five five, one two three, four five six seven tomorrow.'

// Korean auto-tagging
autoTag('전화번호는 010-1234-5678입니다.', { language: 'ko' });
// → '전화번호는 공 . 일 . 공 . 일 . 이 . 삼 . 사 . 오 . 육 . 칠 . 팔 입니다.'

// Japanese auto-tagging
autoTag('受付は6–9時、料金は¥12,800です。', { language: 'ja' });
// → '受付はろくじからくじ、料金はいちまんにせんはっぴゃくえんです。'

// Simplified Chinese auto-tagging
autoTag('客服时间是6–9点,费用是¥12,800。', { language: 'zh' });
// → '客服时间是六点到九点,费用是一万二千八百元。'

// Taiwan Mandarin auto-tagging
autoTag('客服時間是6–9點,費用是NT$12,800。', { language: 'zh-TW' });
// → '客服時間是六點到九點,費用是一萬二千八百新臺幣。'

// Spanish common numeric patterns (official ISO 639-3 code)
autoTag('Total 1,234.5 and 72.5%.', { language: 'spa' });
// → 'Total mil doscientos treinta y cuatro punto cinco and setenta y dos punto cinco%.'

Features

  • 37 TTS Languages: Accepts every SSFM v3.0 ISO 639-3 language code, plus existing short aliases.
  • Auto-tagging: Automatically detects and converts patterns like phone numbers, dates, times, and amounts.
  • Manual-tagging: Explicitly tag text with tagName(value) syntax for precise control.
  • Zero Dependencies: Lightweight, fast, and tree-shakeable. Supports both ESM and CommonJS.

Installation

Install from npm:

# pnpm (recommended)
pnpm add @neosapience/typecast-autotag

# npm
npm install @neosapience/typecast-autotag

# yarn
yarn add @neosapience/typecast-autotag

You can still install directly from GitHub for unreleased branches, tags, or commits:

# Install specific branch
pnpm add git+https://github.com/neosapience/typecast-autotag.git#branch-name

# Install specific tag/version
pnpm add git+https://github.com/neosapience/typecast-autotag.git#v1.5.0

# Install specific commit
pnpm add git+https://github.com/neosapience/typecast-autotag.git#commit-hash

Quick Start

English Text Processing

import { autoTag, manualTag, autoTagWithManual } from '@neosapience/typecast-autotag';

// Auto-tagging - automatically detects patterns (English)
autoTag('Call me at 555-123-4567.', { language: 'en' });
// → 'Call me at five five five, one two three, four five six seven.'

autoTag('The meeting is at 2:30 PM.', { language: 'en' });
// → 'The meeting is at two thirty PM.'

autoTag('Total is $1,500.', { language: 'en' });
// → 'Total is one thousand five hundred dollars.'

// Manual-tagging - explicit control
manualTag('Hello, name(John Smith).', { language: 'en' });
// → 'Hello, J O H N S M I T H.'

manualTag('month(12) day(25) is Christmas.', { language: 'en' });
// → 'December twenty-fifth is Christmas.'

Korean Text Processing

import { autoTag, manualTag, autoTagWithManual } from '@neosapience/typecast-autotag';

// Auto-tagging - automatically detects patterns (Korean)
autoTag('전화번호는 010-1234-5678입니다.', { language: 'ko' });
// → '전화번호는 공 . 일 . 공 . 일 . 이 . 삼 . 사 . 오 . 육 . 칠 . 팔 입니다.'

autoTag('회의는 14:30에 시작합니다.', { language: 'ko' });
// → '회의는 오후 두 시 삼십 분 에 시작합니다.'

autoTag('총 금액은 50000원입니다.', { language: 'ko' });
// → '총 금액은 오만 원 입니다.'

// Manual-tagging - explicit control
manualTag('안녕하세요, name(김철수)님.', { language: 'ko' });
// → '안녕하세요, 김 . 철 . 수님.'

// Combined - use both together
autoTagWithManual('name(김철수)님, 010-1234-5678로 연락주세요.', { language: 'ko' });
// → '김 . 철 . 수 님, 공 . 일 . 공 . 일 . 이 . 삼 . 사 . 오 . 육 . 칠 . 팔 로 연락주세요.'

Japanese Text Processing

import { autoTag, manualTag } from '@neosapience/typecast-autotag';

autoTag('予約日は2026年7月14日、会議は14:30です。', { language: 'ja' });
// → '予約日はにせんにじゅうろくねんしちがつじゅうよっか、会議はじゅうよじさんじゅっぷんです。'

autoTag('スコアは3-2、進捗は72.5%です。', { language: 'ja' });
// → 'スコアはさんたいに、進捗はななじゅうにてんごパーセントです。'

autoTag('東京→大阪、資料は3〜5ページです。', { language: 'ja' });
// → '東京から大阪、資料はさんページからごページです。'

manualTag('暗証番号はdigits(2048)、金額はmoney(5000円)です。', { language: 'ja' });
// → '暗証番号はに・ゼロ・よん・はち、金額はごせんえんです。'

Simplified Chinese Text Processing

import { autoTag, manualTag } from '@neosapience/typecast-autotag';

autoTag('预约日期是2026年7月14日,会议14:30开始。', { language: 'zh' });
// → '预约日期是二零二六年七月十四日,会议十四点三十分开始。'

autoTag('最终比分是3-2,当前进度是72.5%。', { language: 'zh' });
// → '最终比分是三比二,当前进度是百分之七十二点五。'

autoTag('北京→上海,今晚阅读第3至5页。', { language: 'zh' });
// → '北京到上海,今晚阅读第三页到五页。'

manualTag('验证码是digits(2048),总计money(5000元)。', { language: 'zh' });
// → '验证码是二·零·四·八,总计五千元。'

Taiwan Mandarin Text Processing

import { autoTag, manualTag } from '@neosapience/typecast-autotag';

autoTag('手機號碼是0912-345-678,郵遞區號是10617。', { language: 'zh-TW' });
// → '手機號碼是零·九·一·二、三·四·五、六·七·八,郵遞區號是一·零·六·一·七。'

autoTag('訂單編號是AB-2048,航班號是BR108。', { language: 'zh-TW' });
// → '訂單編號是A·B、二·零·四·八,航班號是B·R·一·零·八。'

autoTag('請讀約翰福音3:16,總計NT$1,280。', { language: 'zh-TW' });
// → '請讀約翰福音三章十六節,總計一千二百八十新臺幣。'

manualTag('驗證碼是digits(2048),總計money(5000新臺幣)。', { language: 'zh-TW' });
// → '驗證碼是二·零·四·八,總計五千新臺幣。'

Direct Language Module Access

// Use English module directly
import { english } from '@neosapience/typecast-autotag';

english.autoTag('Call 555-123-4567');
// → 'Call five five five, one two three, four five six seven'

// Use Korean module directly
import { korean } from '@neosapience/typecast-autotag';

korean.autoTag('010-1234-5678');
// → '공 . 일 . 공 . 일 . 이 . 삼 . 사 . 오 . 육 . 칠 . 팔'

// Use Japanese module directly
import { japanese } from '@neosapience/typecast-autotag';

japanese.autoTag('電話番号は090-1234-5678です。');
// → '電話番号はゼロ・きゅう・ゼロ、いち・に・さん・よん、ご・ろく・なな・はちです。'

// Use Simplified Chinese module directly
import { chinese } from '@neosapience/typecast-autotag';

chinese.autoTag('手机号是138-0013-8000。');
// → '手机号是一·三·八、零·零·一·三、八·零·零·零。'

// Use Taiwan Mandarin module directly
import { taiwaneseMandarin } from '@neosapience/typecast-autotag';

taiwaneseMandarin.autoTag('手機號碼是0912-345-678。');
// → '手機號碼是零·九·一·二、三·四·五、六·七·八。'

API Reference

Auto-tagging Functions

// English
autoTag('Call 555-123-4567 tomorrow.', { language: 'en' });
// → 'Call five five five, one two three, four five six seven tomorrow.'

// Enable specific tags only
autoTag('$500, 555-1234', { language: 'en', enabledTags: ['phone'] });
// → '$500, five five five, one two three four'

| Option | Type | Default | Description | | ------------- | ------------------- | ------- | -------------------------------------------- | | language | SupportedLanguage | 'ko' | Official ISO 639-3 code or a supported alias | | enabledTags | string[] | all | Tag types to enable |

extractAutoTags('Phone is 555-123-4567, total is $500.', { language: 'en' });
// [
//   { original: '555-123-4567', tagType: 'phone', start: 9, end: 21 },
//   { original: '$500', tagType: 'money', start: 33, end: 37 }
// ]

Manual-tagging Functions

manualTag('Hello, name(John).', { language: 'en' });
// → 'Hello, J O H N.'

manualTag('Amount is money(10000).', { language: 'en' });
// → 'Amount is ten thousand dollars.'
manualTagSelective('name(John) month(12)', { language: 'en', allowedTags: ['name'] });
// → 'J O H N month(12)'
extractTags('Hello, name(John).');
// [{ tag: 'name', value: 'John', start: 7, end: 17 }]

Combined Function

autoTagWithManual('name(John), call 555-123-4567.', { language: 'en' });
// → 'J O H N, call five five five, one two three, four five six seven.'

Note: Manual tags are processed first, then auto-tags are applied.

Utility Functions

import {
  getSupportedLanguages,
  getSupportedAutoTags,
  getSupportedManualTags,
  setDefaultLanguage,
  getDefaultLanguage,
} from '@neosapience/typecast-autotag';

getSupportedLanguages(); // 5 short codes, 33 other official codes, then kor/eng/jpn/zho
getSupportedAutoTags(); // ['phone', 'datetime', 'time', 'date', ...]
getSupportedManualTags(); // ['name', 'month', 'day', 'date', ...]

Supported Tags

English Auto-tags (Automatically Detected)

| Tag | Description | Input | Output | | -------------- | ---------------- | ------------------ | -------------------------------------------------------------- | | phone | Phone numbers | 555-123-4567 | five five five, one two three, four five six seven | | datetime | Date and time | 2024-01-15T14:30 | January fifteenth, twenty twenty-four, two thirty PM | | time | Time | 2:30 PM | two thirty PM | | date | Date | January 15, 2024 | January fifteenth, twenty twenty-four | | money | Currency amounts | $1,500 | one thousand five hundred dollars | | year | Year | year 2024 | year twenty twenty-four | | month | Month | January | January | | day | Day | the 15th | the fifteenth | | order | Ordinal numbers | 1st place | first place | | point | Points/scores | 95 points | ninety-five points | | piece | Counting | 5 items | five items | | minsec | Duration (m/s) | 5m30s, 100ms | five minutes thirty seconds, one hundred milliseconds | | ratio | Ratio/percent | 50%, 1:2 | fifty percent, one to two | | duration | Period | 3 months | three months | | floor | Floor numbers | 5th floor, B1 | fifth floor, basement one | | weight | Weight | 5kg, 100lb | five kilograms, one hundred pounds | | distance | Distance | 5km, 100m | five kilometers, one hundred meters | | temperature | Temperature | 25°C, -5°F | twenty-five degrees Celsius, minus five degrees Fahrenheit | | volume | Volume/capacity | 500ml, 2L | five hundred milliliters, two liters | | dataCapacity | Data capacity | 100GB, 50Mbps | one hundred gigabytes, fifty megabits per second | | inch | Inch | 55 inches | fifty-five inches |

Korean Auto-tags (Automatically Detected)

| Tag | Description | Input | Output | | -------------- | ---------------- | ------------------ | ------------------------------------------------------ | | phone | Phone numbers | 010-1234-5678 | 공 . 일 . 공 . 일 . 이 . 삼 . 사 . 오 . 육 . 칠 . 팔 | | datetime | Date and time | 2024-01-15T14:30 | 이천이십사년 일월 십오일 오후 두 시 삼십 분 | | time | Time | 14:30 | 오후 두 시 삼십 분 | | date | Date | 2024-01-15 | 이천이십사년 일월 십오일 | | money | Currency amounts | 50000원 | 오만 원 | | year | Year | 2024년 | 이천이십사년 | | month | Month | 12월 | 십이월 | | day | Day | 25일 | 이십오일 | | order | Ordinal numbers | 3번째, 2등 | 세 번째, 이 등 | | point | Points/scores | 95점 | 구십오 점 | | piece | Counting | 5개 | 다섯 개 | | minsec | Duration (m/s) | 5분30초, 100ms | 오 분 삼십 초, 백 밀리초 | | ratio | Ratio/percent | 50%, 1:2 | 오십 퍼센트, 일 대 이 | | duration | Period | 3개월 | 삼 개월 | | floor | Floor numbers | 5층, B1층 | 오 층, 지하 일 층 | | weight | Weight | 5kg, 100g | 오 킬로그램, 백 그램 | | distance | Distance | 5km | 오 킬로미터 | | temperature | Temperature | 25℃, -5°C | 이십오 도, 영하 오 도 | | volume | Volume/capacity | 500ml, 2L | 오백 밀리리터, 이 리터 | | dataCapacity | Data capacity | 100GB, 50Mbps | 백 기가바이트, 오십 메가비피에스 | | inch | Inch | 55인치 | 오십오 인치 |

Japanese Auto-tags (Automatically Detected)

| Tag | Description | Input | Output | | ------------------------- | -------------------------- | -------------------- | ---------------------------------------------------------------- | | phone | Phone number | 090-1234-5678 | ゼロ・きゅう・ゼロ、いち・に・さん・よん、ご・ろく・なな・はち | | postalCode | Postal code | 〒100-0001 | 郵便番号いち・ゼロ・ゼロ、ゼロ・ゼロ・ゼロ・いち | | date / datetime | Date and time | 2026年7月14日 | にせんにじゅうろくねんしちがつじゅうよっか | | time | Time | 14:30 | じゅうよじさんじゅっぷん | | range | Time, price, or page range | 6–9時 | ろくじからくじ | | money | Currency | ¥12,800 | いちまんにせんはっぴゃくえん | | score / ratio | Score or ratio | スコアは3-2 | スコアはさんたいに | | percentage / fraction | Percentage or fraction | 72.5%, 1/2 | ななじゅうにてんごパーセント, にぶんのいち | | order | Chapter, rank, or number | 第7章, No. 5 | だいななしょう, ナンバーご | | unit | Measurements and counters | 25kg, 2人, 3本 | にじゅうごキログラム, ふたり, さんぼん | | email | Email symbols | [email protected] | help アットマーク example ドット jp | | direction | Direction arrow | 東京→大阪 | 東京から大阪 | | serial / account | Contextual identifiers | 注文番号はAB-2048 | 注文番号はA・B、に・ゼロ・よん・はち | | flight | Flight number | 便名はNH2048 | 便名はN・H・に・ゼロ・よん・はち | | scripture | Scripture reference | ヨハネ3:16 | ヨハネさんしょうじゅうろくせつ |

Simplified Chinese Auto-tags (Automatically Detected)

| Tag | Description | Input | Output | | ------------------------- | -------------------------- | ---------------------- | ------------------------------------ | | phone | Phone number | 138-0013-8000 | 一·三·八、零·零·一·三、八·零·零·零 | | postalCode | Postal code | 邮编是100000 | 邮编是一·零·零·零·零·零 | | date / datetime | Date and time | 2026年7月14日 | 二零二六年七月十四日 | | time | Time | 14:30 | 十四点三十分 | | range | Time, price, or page range | 6–9点 | 六点到九点 | | money | Currency | ¥12,800 | 一万二千八百元 | | score / ratio | Score or ratio | 最终比分是3-2 | 最终比分是三比二 | | percentage / fraction | Percentage or fraction | 72.5%, 1/2 | 百分之七十二点五, 二分之一 | | order | Chapter, rank, or number | 第7章, No. 5 | 第七章, 编号五 | | unit | Measurements and counters | 25kg, 2人, 3本书 | 二十五千克, 两人, 三本书 | | email | Email symbols | [email protected] | help 艾特 example 点 cn | | direction | Direction arrow | 北京→上海 | 北京到上海 | | serial / account | Contextual identifiers | 订单编号是AB-2048 | 订单编号是A·B、二·零·四·八 | | flight | Flight number | 航班号是MU512 | 航班号是M·U·五·一·二 | | scripture | Scripture reference | 约翰福音3:16 | 约翰福音三章十六节 |

Taiwan Mandarin Auto-tags (Automatically Detected)

| Tag | Description | Input | Output | | -------------------- | ---------------------- | --------------------- | -------------------------------------- | | phone | Taiwan phone number | 0912-345-678 | 零·九·一·二、三·四·五、六·七·八 | | postalCode | Taiwan postal code | 郵遞區號是10617 | 郵遞區號是一·零·六·一·七 | | date / datetime | Date and time | 2026年7月14日 | 二零二六年七月十四日 | | time / range | Time and range | 6–9點 | 六點到九點 | | money | Taiwan currency | NT$12,800 | 一萬二千八百新臺幣 | | score / ratio | Score or ratio | 最終比數是3-2 | 最終比數是三比二 | | unit | Taiwan measurements | 25kg, 30cm, 2TB | 二十五公斤, 三十公分, 二太位元組 | | serial / account | Contextual identifiers | 訂單編號是AB-2048 | 訂單編號是A·B、二·零·四·八 | | flight | Flight number | 航班號是BR108 | 航班號是B·R·一·零·八 | | scripture | Scripture reference | 約翰福音3:16 | 約翰福音三章十六節 | | email | Email symbols | [email protected] | help 小老鼠 example 點 tw |

Manual-only Tags

| Tag | Description | English Syntax | Korean Syntax | | --------- | --------------------- | ------------------------------------- | ------------------------------------------------------------ | | name | Name (char-by-char) | name(John)J O H N | name(김철수)김 . 철 . 수 | | digits | Digit-by-digit | digits(1234)one two three four | digits(1234)일 . 이 . 삼 . 사 | | address | Address (Korean only) | - | address(102동 1101호 (엘지동, 아파트))백이동 천백일호 |

Tip: All auto-tags can also be used as manual tags with explicit syntax.

Examples

// English
autoTag('555-123-4567', { language: 'en' }); // → 'five five five, one two three, four five six seven'
autoTag('(212) 555-1234', { language: 'en' }); // → 'two one two, five five five, one two three four'
autoTag('1-800-555-1234', { language: 'en' }); // → 'one, eight zero zero, five five five, one two three four'
autoTag('911', { language: 'en' }); // → 'nine one one'

// Korean
autoTag('010-1234-5678', { language: 'ko' }); // → '공 . 일 . 공 . 일 . 이 . 삼 . 사 . 오 . 육 . 칠 . 팔'
autoTag('02-123-4567', { language: 'ko' }); // → '공 . 이 . 일 . 이 . 삼 . 사 . 오 . 육 . 칠'
// English
autoTag('January 15, 2024', { language: 'en' }); // → 'January fifteenth, twenty twenty-four'
autoTag('2:30 PM', { language: 'en' }); // → 'two thirty PM'
autoTag('10:00 AM', { language: 'en' }); // → 'ten AM'

// Korean
autoTag('2024-01-15', { language: 'ko' }); // → '이천이십사년 일월 십오일'
autoTag('14:30', { language: 'ko' }); // → '오후 두 시 삼십 분'
// English
autoTag('$50', { language: 'en' }); // → 'fifty dollars'
autoTag('$1,234.56', { language: 'en' }); // → 'one thousand two hundred thirty-four dollars and fifty-six cents'
autoTag('€100', { language: 'en' }); // → 'one hundred euros'

// Korean
autoTag('50000원', { language: 'ko' }); // → '오만 원'
autoTag('1,234,567원', { language: 'ko' }); // → '백이십삼만사천오백육십칠 원'
// English
manualTag('name(John)', { language: 'en' }); // → 'J O H N'
manualTag('name(John Smith)', { language: 'en' }); // → 'J O H N S M I T H'

// Korean
manualTag('name(김철수)', { language: 'ko' }); // → '김 . 철 . 수'
manualTag('name(홍길동)', { language: 'ko' }); // → '홍 . 길 . 동'

Use Cases

AICC (AI Contact Center)

Perfect for converting structured data to natural speech in automated phone systems:

// English
const script = autoTagWithManual(
  `
  Hello, name(${customerName}).
  Your order will be delivered on ${deliveryDate}.
  For questions, call ${supportPhone}.
`,
  { language: 'en' }
);

// Korean
const script = autoTagWithManual(
  `
  안녕하세요, name(${customerName})님.
  주문하신 상품이 ${deliveryDate}에 배송될 예정입니다.
  문의사항은 ${supportPhone}으로 연락주세요.
`,
  { language: 'ko' }
);

IVR Systems

Generate natural-sounding automated responses:

// English
autoTag('Your balance is $1,234.56.', { language: 'en' });
// → 'Your balance is one thousand two hundred thirty-four dollars and fifty-six cents.'

// Korean
autoTag('고객님의 잔액은 1,234,567원입니다.', { language: 'ko' });
// → '고객님의 잔액은 백이십삼만사천오백육십칠 원 입니다.'

Advanced Usage

Direct Language Module Access

import { korean, english } from '@neosapience/typecast-autotag';

// Use language-specific functions
korean.autoTag('010-1234-5678');
english.autoTag('555-123-4567');

// Access individual tag converters through the language modules
korean.name('김철수');
english.phone('555-123-4567');

Development

Prerequisites

  • Node.js >= 18
  • pnpm 9.x

Quick Setup

# Clone and setup everything (including C binding)
git clone <repository-url>
cd typecast-autotag
pnpm setup

Commands

| Command | Description | | -------------------- | ---------------------------------------- | | pnpm install | Install dependencies | | pnpm setup | Full setup (install + build + c-binding) | | pnpm dev | Watch mode | | pnpm build | Build for production | | pnpm test | Run all tests (jest + e2e) | | pnpm test:jest | Run jest tests only | | pnpm test:e2e | Run e2e tests only | | pnpm test:coverage | Run tests with coverage | | pnpm typecheck | Type check | | pnpm lint | Lint code | | pnpm format | Format code |

Other Bindings

| Language | Documentation | | -------- | ------------------------------------------------------ | | C/C++ | c-binding/README.md | | Python | python-binding/README.md | | Java | java-binding/README.md |

Project Structure

src/
├── index.ts                    # Main entry point
├── korean/                     # Korean language module
│   ├── index.ts                # Korean module exports
│   ├── auto-tag.ts             # Auto-tagging logic
│   ├── manual-tag.ts           # Manual-tagging logic
│   ├── tags/                   # Individual tag converters
│   └── utils/
│       └── number-to-korean.ts # Number conversion utilities
├── english/                    # English language module
    ├── index.ts                # English module exports
    ├── auto-tag.ts             # Auto-tagging logic
    ├── manual-tag.ts           # Manual-tagging logic
    ├── tags/                   # Individual tag converters
    └── utils/
│       └── number-to-english.ts # Number conversion utilities
├── japanese/                   # Japanese language module
│   └── index.ts                # Japanese rules and number readings
├── chinese/                    # Simplified Chinese language module
│   └── index.ts                # Chinese rules and number readings
└── taiwanese-mandarin/         # Taiwan Mandarin adapter
    └── index.ts                # Taiwan readings over shared Chinese rules

Releasing

This project uses release-it for GitHub Releases. Public registry publishing is handled by GitHub Actions; see PUBLISHING.md for the npm, PyPI, and Maven Central checklist.

Setup

  1. Copy the example environment file:
cp .env.example .env
  1. Add your GitHub Personal Access Token to .env:
GITHUB_TOKEN=<your-github-token>

Generate a token at GitHub Settings → Tokens with permission to create releases and upload release assets.

Creating a Release

# Dry run (preview without publishing)
pnpm release:dry

# Create a release
pnpm release

This will:

  • Run tests and build
  • Bump version based on Conventional Commits
  • Generate/update CHANGELOG.md
  • Create a Git tag
  • Create a GitHub Release with pre-built C binding binaries attached

After the release tag is created, run the publishing workflows for:

  • npm: @neosapience/typecast-autotag
  • PyPI: typecast-autotag
  • Maven Central: com.neosapience:typecast-autotag

Release Assets

The following pre-built binaries are automatically attached to each release:

| Platform | Files | | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | macOS | libtypecast_autotag.dylib | | Linux | libtypecast_autotag.so, libtypecast_autotag_arm64.so, libtypecast_autotag_armv7.so, libtypecast_autotag_x86_64.so, libtypecast_autotag_x86.so | | Windows | typecast_autotag.dll, typecast_autotag.lib, typecast_autotag_i686.dll, typecast_autotag_i686.lib, typecast_autotag_x86_64.dll, typecast_autotag_x86_64.lib | | Header | typecast_autotag.h |

Note: Make sure to build the C bindings before releasing: pnpm c-binding:build-all-multiarch

License

This project is licensed under the MIT License — Copyright (c) 2026 Neosapience, Inc.


Made for Typecast

Back to Top