BroadRouter

Voice notes to text for business: WhatsApp and Telegram to tickets

By the BroadNet Inference team · 4 min read · Published · Updated

To turn customer voice notes into tickets, download each note from the WhatsApp Cloud API or Telegram Bot API as soon as the webhook arrives, convert it to WAV, transcribe it with the right language code, then ask an LLM to extract intent, urgency and order numbers as JSON. Create the ticket with the transcript attached and reply in text.

An invoice, a phone showing an audio waveform and the Arabic word "مرحبا", with the text "Speech. Documents. Intelligence."

In much of the Middle East, customers do not type. They send a 40-second voice note in Gulf or Egyptian Arabic, often with an order number read out in the middle. Agents then listen, rewind, and type it into the helpdesk. Multiply by a few hundred a day and voice notes become the slowest channel you have.

This post builds the business workflow around transcription: getting notes out of WhatsApp and Telegram, turning them into structured tickets, and keeping the data under control. For the conversion and transcription code itself, see our step-by-step guide to transcribing WhatsApp voice notes. We will not repeat it here.

How does a voice note become a support ticket?

  1. Receive the webhook from WhatsApp or Telegram.
  2. Download the audio immediately.
  3. Convert to 16 kHz mono WAV.
  4. Transcribe with the right language code.
  5. Extract ticket fields with an LLM.
  6. Create the ticket, with transcript, and reply in text.
  7. Delete the audio file.

Steps 1 and 2: how do you get the audio out of WhatsApp?

On the WhatsApp Business Cloud API, an inbound voice note arrives as a webhook with a media ID, not the file. Meta’s media docs set the rules:

  • Call GET /<MEDIA_ID> on the Graph API to get a url.
  • Download that URL with Authorization: Bearer <token>. Without the token the request fails.
  • “Media URLs expire after 5 minutes.” Request a new one if you are late.
  • Media IDs from incoming webhooks are valid for 7 days.
import os, requests

GRAPH = os.environ["GRAPH_BASE"]          # e.g. https://graph.facebook.com/<version>
HDR = {"Authorization": f"Bearer {os.environ['WA_TOKEN']}"}

def download_whatsapp(media_id, path):
    url = requests.get(f"{GRAPH}/{media_id}", headers=HDR, timeout=10).json()["url"]
    with open(path, "wb") as f:
        f.write(requests.get(url, headers=HDR, timeout=30).content)

Do this in the webhook handler’s background job, not later in a batch. A queue that runs once an hour will hit expired URLs.

How do you get voice notes out of a Telegram bot?

A Telegram bot receives a voice object with a file_id. The Bot API says bots “can download files of up to 20MB”, via https://api.telegram.org/file/bot<token>/<file_path>, and the link is “valid for at least 1 hour”.

TG = f"https://api.telegram.org/bot{os.environ['TG_TOKEN']}"

def download_telegram(file_id, path):
    file_path = requests.get(f"{TG}/getFile", params={"file_id": file_id}, timeout=10).json()["result"]["file_path"]
    with open(path, "wb") as f:
        f.write(requests.get(f"https://api.telegram.org/file/bot{os.environ['TG_TOKEN']}/{file_path}", timeout=30).content)

Both platforms deliver Ogg/Opus voice notes in practice. The transcription endpoint takes WAV or MP3, so convert with the one-line ffmpeg command from the WhatsApp guide, then transcribe with language="ar" (or the customer’s language).

Step 5: how do you turn a transcript into a ticket?

A raw transcript is still hard to triage. An LLM can pull out the fields your helpdesk needs:

import json
from openai import OpenAI

client = OpenAI(base_url="https://inference.broadnet.ai/v1", api_key=os.environ["BROADNET_API_KEY"])

FIELDS = ("Return JSON with: intent (refund|delivery|billing|technical|other), urgency (low|normal|high), "
          "order_number (string or null), language, summary_en (one sentence), needs_human (true/false).")

def to_ticket(transcript):
    reply = client.chat.completions.create(
        model="broadnet/qwen3.8-27b",
        response_format={"type": "json_object"},
        messages=[{"role": "system", "content": "You triage customer support voice notes. " + FIELDS},
                  {"role": "user", "content": transcript}],
    ).choices[0].message.content
    return json.loads(reply)

Qwen3.8 27B is the model BroadNet tested for Arabic, including Gulf and Egyptian dialects. Validate the JSON before you write it to the helpdesk, and fall back to needs_human: true when parsing fails; the structured output post has a validate-and-repair loop. If a note mentions card or ID numbers, redact before this step; see sending sensitive data to an LLM API.

Which edge cases should you handle early?

Real inboxes are messier than a demo. Plan for these from the first week:

  • Several notes in a row. Customers often send three short notes instead of one long one. Group notes from the same sender within a couple of minutes into one ticket, and transcribe them in order.
  • Very short notes. “Okay” or “thanks” notes do not need a ticket. Skip extraction when the transcript is under a few words.
  • Forwarded notes. A forwarded voice note may be someone else speaking. Treat it as an attachment, not as the customer’s own words.
  • Mixed language. Gulf customers mix in English product names. If your queue serves several languages, record the language you sent with each transcript so agents know what to expect.
  • Large files. Meta’s media docs list a 16 MB audio limit and Telegram bots can download up to 20 MB, both under the 25 MiB transcription limit, but long recordings still take longer. Process them in the background.

What a team gets from it

Before After
Agent listens to each note, often twice Agent reads a transcript and a one-line summary
Notes cannot be searched Transcripts are searchable by order number or keyword
Triage by whoever is free Routing by intent and urgency
Arabic notes wait for an Arabic speaker English summary lets any agent pick up simple cases

What does voice-note transcription cost?

Transcription is the cheap part of the pipeline. At $0.0042 a minute, 10,000 Arabic voice notes of 30 seconds cost $21.00. The 14-language model costs $0.002 a minute. The LLM step is priced per token; a short transcript plus the instruction is typically a few hundred tokens. Put your own volumes into the speech-to-text cost calculator, or compare other providers in the speech-to-text pricing comparison.

How should you handle privacy and retention?

Voice notes are personal data, and they often contain more than the customer meant to share. Three habits help:

  • Delete audio after transcription unless a policy requires you to keep it.
  • Store transcripts with the ticket, under the helpdesk’s access controls, not in app logs.
  • Use a provider that does not keep audio. BroadNet keeps no audio or transcripts after the request; see zero data retention.

Reply in plain text, and keep first replies to new contacts short and free of links. Messaging platforms watch for spam-like patterns from business numbers.

Where BroadNet Inference fits

BroadNet covers the transcription and extraction steps with one OpenAI-compatible key: BroadNet Transcribe Arabic for Arabic notes, BroadNet Transcribe for Arabic plus 13 other languages, and Arabic-tested chat models for the ticket fields. BroadNet reports its Arabic model #2 of 37 (its September 2026 figure; the live board listed it #4 of 39 on 15 November 2026) on the Open Universal Arabic ASR Leaderboard. The $5 starting credit covers about 1,190 minutes of Arabic audio.

BroadNet does not connect to WhatsApp, Telegram or your helpdesk for you; the webhook handling and ticket creation are your code or your automation tool. Calls are a different shape of problem, with two speakers and long recordings: see transcribing call center recordings.

Questions

Can I transcribe WhatsApp voice notes automatically?

Yes. With the WhatsApp Business Cloud API, each voice note arrives as a webhook with a media ID. Your server fetches the media URL, downloads the file with your access token, converts it and sends it to a transcription API.

How do I convert Telegram voice messages to text?

Your bot receives a voice object with a file_id. Call getFile, download the file from the returned path, convert it to WAV with ffmpeg and transcribe it. Bots can download files up to 20 MB.

How much does it cost to transcribe customer voice notes?

With BroadNet Transcribe Arabic at $0.0042 a minute, 10,000 notes of 30 seconds cost $21.00. The 14-language model costs $0.002 a minute.

Should I reply to a voice note with a voice note?

Usually a short text reply works better for support: the customer can read it anywhere and it is searchable on both sides. Keep the first reply plain and short.

Do I need to store the original audio?

Often not. The transcript is enough for most support workflows. If you keep audio for quality or legal reasons, set a retention period and restrict access, because voice is personal data.

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity