import type { ApiProvider } from '../../types';
export type TtsProviderName = 'elevenlabs' | 'azure';
export interface TtsProviderConfig {
    voiceId?: string;
    modelId?: string;
    language?: string;
    voiceName?: string;
    stability?: number;
    similarityBoost?: number;
    style?: number;
    useSpeakerBoost?: boolean;
    pitch?: string | number;
    rate?: string | number;
    volume?: string | number;
    [key: string]: any;
}
export interface TtsProviderMetadata {
    name: TtsProviderName;
    displayName: string;
    defaultVoiceId?: string;
    defaultModelId?: string;
    defaultVoiceName?: string;
    supportedFormats: string[];
    supportedSampleRates: string[];
    costPerMillionChars: number;
}
export interface FormatConverter {
    convert(outputFormat: string, sampleRate: string): string;
}
export interface ProviderFactory {
    create(config: TtsProviderConfig, outputFormat: string, sampleRate: string): ApiProvider;
    getMetadata(): TtsProviderMetadata;
}
export interface BillingOptions {
    projectId?: string;
    sendBillingLogs?: boolean;
}
/**
 * Converts text to audio using configured TTS provider from workspace
 * Falls back to default providers if no provider is configured
 *
 * @param text - Text to convert to audio
 * @param workspaceId - Workspace ID to find TTS provider configuration
 * @param outputFormat - Output format: 'mp3', 'wav', or 'opus'
 * @param sampleRate - Sample rate: '16000', '22050', '24000', '44100', '48000'
 * @param language - Language code (optional, defaults to 'en-US')
 * @param options - Optional parameters for billing
 * @param options.projectId - Project ID for billing logs
 * @param options.sendBillingLogs - Whether to send billing logs (default: false)
 * @returns Base64 encoded audio string
 */
export declare function convertTextToAudioWithProvider(text: string, workspaceId: string, outputFormat?: string, sampleRate?: string, language?: string, options?: BillingOptions): Promise<string>;
/**
 * Converts text to audio file using configured TTS provider
 * Saves the audio to a file and returns the file path
 *
 * @param text - Text to convert to audio
 * @param workspaceId - Workspace ID to find TTS provider configuration
 * @param outputFormat - Output format: 'mp3', 'wav', or 'opus' (.webm/.ogg)
 * @param sampleRate - Sample rate: '16000', '22050', '24000', '44100', '48000'
 * @param columnName - Column name for file naming
 * @param resultCounter - Counter for unique file naming
 * @param audioFolder - Folder to save audio files
 * @param language - Language code (optional, defaults to 'en-US')
 * @param projectId - Project ID for billing logs
 * @returns File path of generated audio
 */
/** Flatten voice column names (e.g. "About_Him/Her") into a single safe filename segment. */
export declare function sanitizeAudioFileNameSegment(name: string): string;
export declare function convertTextToAudioFile(text: string, workspaceId: string, outputFormat: string, sampleRate: string, columnName: string, resultCounter: number, audioFolder: string, language?: string, projectId?: string): Promise<string>;
/**
 * Register a new TTS provider
 * This allows external code to add custom TTS providers
 *
 * @example
 * ```typescript
 * registerTtsProvider('custom', {
 *   create: (config, format, rate) => new CustomProvider(config),
 *   getMetadata: () => ({
 *     name: 'custom',
 *     displayName: 'Custom TTS',
 *     costPerMillionChars: 50.0,
 *     supportedFormats: ['mp3', 'wav'],
 *     supportedSampleRates: ['44100'],
 *   }),
 * });
 * ```
 */
export declare function registerTtsProvider(name: TtsProviderName, factory: ProviderFactory): void;
/**
 * Get metadata for a registered provider
 */
export declare function getProviderMetadata(name: TtsProviderName): TtsProviderMetadata | undefined;
/**
 * Get all registered provider names
 */
export declare function getRegisteredProviders(): TtsProviderName[];
//# sourceMappingURL=convertTextToAudioWithProvider.d.ts.map