5 // telegramVoiceText keeps a voice note or a fixed failure marker. Download and
6 // decode failures do not block later updates. Only owner messages reach it.
7 func telegramVoiceText(ctx context.Context, api *TelegramAPI, store *VoiceStore, transcriber *VoiceTranscriber, message *TelegramMessage) string {
8 text := "(voice not downloaded)"
9 if message.Voice.FileSize <= voiceMaxBytes {
10 data, err := api.GetFile(ctx, message.Voice.FileID, voiceMaxBytes, errVoiceSize)
12 text = transcriber.Text(ctx, store, data)
16 if message.Caption != "" {
17 text += "\n" + message.Caption