import { MusicClient as GeneratedMusic } from "../api/resources/music/client/Client";
import { CompositionPlanClient } from "../api/resources/music/resources/compositionPlan/client/Client";
import type * as ElevenLabs from "../api";
import * as core from "../core";
export declare namespace Music {
    interface Options extends GeneratedMusic.Options {
    }
    interface RequestOptions extends GeneratedMusic.RequestOptions {
    }
}
export interface SongMetadata {
    title: string;
    description: string;
    genres: string[];
    languages: string[];
    is_explicit: boolean;
}
export interface MultipartResponse {
    json: {
        compositionPlan: ElevenLabs.MusicPrompt;
        songMetadata: SongMetadata;
    };
    audio: Buffer;
    filename: string;
}
export declare class Music {
    private _client;
    private readonly _options;
    private _compositionPlan;
    constructor(options?: Music.Options);
    /**
     * Get the composition plan client
     */
    get compositionPlan(): CompositionPlanClient;
    /**
     * Compose a song from a prompt or a composition plan.
     * @throws {@link ElevenLabs.UnprocessableEntityError}
     */
    compose(request?: ElevenLabs.BodyComposeMusicV1MusicPost, requestOptions?: Music.RequestOptions): core.HttpResponsePromise<ReadableStream<Uint8Array>>;
    private __compose;
    /**
     * Compose a song from a prompt or a composition plan with detailed response parsing.
     *
     * Unlike the standard `compose()` method which returns a raw audio stream, this method
     * automatically parses the multipart response to extract both the audio file and rich
     * metadata about the generated composition.
     *
     * @param request - The music composition request containing either:
     *   - `prompt`: A text description of the desired music (e.g., "upbeat electronic dance music")
     *   - `compositionPlan`: A detailed composition plan object created via `compositionPlan.create()`
     *   - `musicLengthMs`: Optional duration in milliseconds (10000-300000ms)
     *
     * @param requestOptions - Optional request configuration (e.g., timeout, signal, headers)
     *
     * @returns A promise that resolves to a `MultipartResponse` containing:
     *   - `json.compositionPlan`: The detailed composition plan structure including sections,
     *     styles, and lyrics
     *   - `json.songMetadata`: Metadata about the generated song (title, description, genres,
     *     languages, explicit content flag)
     *   - `audio`: Buffer containing the complete audio file (MP3 format)
     *   - `filename`: Suggested filename for the audio file
     *
     * @throws {@link ElevenLabs.UnprocessableEntityError} If the request parameters are invalid
     *   or the music generation fails
     *
     * @example
     * ```typescript
     * const client = new ElevenLabs({ apiKey: "your-api-key" });
     *
     * // Generate music from a text prompt
     * const response = await client.music.composeDetailed({
     *   prompt: "Epic orchestral music with dramatic strings and powerful brass",
     *   musicLengthMs: 60000 // 60 seconds
     * });
     *
     * console.log("Title:", response.json.songMetadata.title);
     * console.log("Genres:", response.json.songMetadata.genres);
     *
     * // Save the audio to a file
     * fs.writeFileSync(response.filename, response.audio);
     * ```
     *
     * @example
     * ```typescript
     * // Generate music from a composition plan
     * const plan = await client.music.compositionPlan.create({
     *   prompt: "A progressive rock song about space exploration"
     * });
     *
     * const response = await client.music.composeDetailed({
     *   compositionPlan: plan.compositionPlan
     * });
     *
     * // Access detailed section information
     * for (const section of response.json.compositionPlan.sections) {
     *   console.log(`${section.sectionName}: ${section.durationMs}ms`);
     * }
     * ```
     */
    composeDetailed(request?: ElevenLabs.BodyComposeMusicWithADetailedResponseV1MusicDetailedPost, requestOptions?: Music.RequestOptions): core.HttpResponsePromise<MultipartResponse>;
    private _composeDetailed;
    private __composeDetailed;
    /**
     * Stream a composed song from a prompt or a composition plan.
     * @throws {@link ElevenLabs.UnprocessableEntityError}
     */
    stream(request?: ElevenLabs.BodyStreamComposedMusicV1MusicStreamPost, requestOptions?: Music.RequestOptions): core.HttpResponsePromise<ReadableStream<Uint8Array>>;
    private __stream;
    /**
     * Separate a music file into individual stems
     * @throws {@link ElevenLabs.UnprocessableEntityError}
     */
    separateStems(request: ElevenLabs.BodyStemSeparationV1MusicStemSeparationPost, requestOptions?: Music.RequestOptions): core.HttpResponsePromise<ReadableStream<Uint8Array>>;
    private __separateStems;
    /**
     * Reads a ReadableStream containing multipart data and parses it into JSON and audio parts
     * @param stream - ReadableStream from ElevenLabs music API response
     * @returns Object containing parsed JSON metadata, audio Buffer, and filename
     */
    private parseMultipart;
    /**
     * Converts snake_case keys to camelCase recursively
     */
    private toCamelCase;
}
