Formatting & Redaction
Custom Keyword Redaction
Masks specific words or phrases using regex (case-insensitive, no LLM). Works independently of enable_profanity_hashing.
Python SDK
python
config = TranscriptionConfig(
model="zero-indic",
hash_keywords=["account number", "card number", "OTP"],
)
result = await client.asr.transcribe("audio.wav", config=config)
print(result.text)
# aapka **** 4321 hai aur aapka **** kal bheja gaya tha
for seg in result.segments:
print(seg.text)
# aapka **** 4321 hai aur aapka **** kal bheja gaya thaREST API
terminal
curl -X POST https://asr.shunyalabs.ai/v1/audio/transcriptions \
-H "Authorization: Bearer <API_KEY>" \
-F "[email protected]" \
-F "model=zero-indic" \
-F 'hash_keywords=["account number", "card number", "OTP"]'Output
json
{
"text": "aapka **** 4321 hai aur aapka **** kal bheja gaya tha",
"segments": [
{ "start": 0.0, "end": 5.0, "text": "aapka **** 4321 hai aur aapka **** kal bheja gaya tha" }
]
}