/**
 * Handles the S2S-to-chained-pipeline fallback when S2S voice processing fails.
 *
 * Attempts STT on the original audio before stripping audio context, so the
 * chained pipeline receives a real transcript instead of a useless placeholder.
 */
import type { MsgContext } from "../../../auto-reply/templating.js";
import type { OpenClawConfig } from "../../../config/config.js";
/** Placeholder text when both S2S and STT fail. */
export declare const VOICE_NOTE_FALLBACK_TEXT = "[voice note \u2014 transcription unavailable, ask the user to repeat or type their message]";
export interface S2SFallbackResult {
    /** "transcript" if STT succeeded, "placeholder" if both S2S and STT failed. */
    outcome: "transcript" | "placeholder";
    /** The transcript text (only when outcome is "transcript"). */
    transcript?: string;
}
/**
 * Attempt STT on the original audio file and inject the transcript into body
 * fields. If STT also fails, replace audio placeholders with a graceful
 * fallback message. Always strips MediaType and MediaPath so the chained
 * pipeline doesn't try auto-TTS (which would cause duplicate audio responses).
 */
export declare function handleS2SFallback(params: {
    ctx: MsgContext;
    cfg: OpenClawConfig;
    mediaPath: string | undefined;
    mediaType: string | undefined;
    agentDir: string;
}): Promise<S2SFallbackResult>;
