---
title: melotts
description: MeloTTS is a high-quality multi-lingual text-to-speech library by MyShell.ai.
image: https://edgetunnel-b2h.pages.dev/dev-products-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/workers-ai/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

![MyShell logo](https://edgetunnel-b2h.pages.dev/_astro/myshell.BpTDMxd2.svg) 

#  melotts 

Text-to-Speech • MyShell 

`@cf/myshell-ai/melotts` 

MeloTTS is a high-quality multi-lingual text-to-speech library by MyShell.ai.

| Model Info   |                          |
| ------------ | ------------------------ |
| Unit Pricing | $0.0002 per audio minute |

## Usage

**TypeScript**

```ts
export interface Env {
  AI: Ai;
}


export default {
  async fetch(request, env): Promise<Response> {
    const { audio } = await env.AI.run('@cf/myshell-ai/melotts', {
      prompt: 'Hello world',
      lang: 'en',
    });
    // Returns the base64 encoded MP3 audio
    return Response.json({ audio });
  },
} satisfies ExportedHandler<Env>;
```

## Parameters

* [ Input ](#tab-panel-5486)
* [ Output ](#tab-panel-5487)

prompt

`string`requiredminLength: 1A text description of the audio you want to generate

lang

`string`default: enThe speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en' if not specified

▶Option 1{}

objectcontentType: application/json

Option 2

stringcontentType: audio/mpegformat: binary

The generated audio in MP3 format

## API Schemas (Raw)

Input [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/melotts/schema-input.json "Open") [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/melotts/schema-input.json "Download") 

Output [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/melotts/schema-output.json "Open") [ ](https://edgetunnel-b2h.pages.dev/workers-ai/models/melotts/schema-output.json "Download")

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://edgetunnel-b2h.pages.dev/workers-ai/models/melotts/#page","headline":"melotts (MyShell) · Cloudflare AI docs · Cloudflare Workers AI docs","description":"MeloTTS is a high-quality multi-lingual text-to-speech library by MyShell.ai.","url":"https://edgetunnel-b2h.pages.dev/workers-ai/models/melotts/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/dev-products-preview.png","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/workers-ai/","name":"Workers AI"}},{"@type":"ListItem","position":3,"item":{"@id":"/workers-ai/models/","name":"Models"}}]}
```
