# Create Custom Voice — LMNT

> Generates a custom voice from a batch of input audio data. See the documentation

- Key: `lmnt-create-custom-voice`
- Type: Action (Write)
- Version: 1.0.3
- App: LMNT (`lmnt`) — https://pipedream.com/apps/lmnt.md
- This page (HTML): https://pipedream.com/apps/lmnt/actions/create-custom-voice
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/lmnt/actions/create-custom-voice/create-custom-voice.mjs

## Description

Generates a custom voice from a batch of input audio data. [See the documentation](https://docs.lmnt.com/api-reference/voice/create-voice)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `files` | `string[]` | Yes | One or more .wav or .mp3 file paths or URLs. Max attached files: 20. Max total file size: 250 MB. |
| `name` | `string` | Yes | The display name for this voice. |
| `enhance` | `boolean` | Yes | For unclean audio with background noise, applies processing to attempt to improve quality. Not on by default as it can also degrade quality in some circumstances. |
| `type` | `string` | No | The type of voice to create. Defaults to instant. |
| `gender` | `string` | No | A tag describing the gender of this voice. Has no effect on voice creation. |
| `description` | `string` | No | A text description of this voice. |
| `syncDir` | `dir` | No | SyncDir |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "lmnt",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "lmnt-create-custom-voice",
  arguments: {
    files: ["Audio Files Paths or URLs"],
    name: "Name",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "lmnt-create-custom-voice",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    lmnt: { authProvisionId: "apn_xxxxxxx" },
    files: ["Audio Files Paths or URLs"],
    name: "Name",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "lmnt-create-custom-voice",
    "configured_props": {
      "lmnt": { "authProvisionId": "apn_xxxxxxx" },
      "files": ["Audio Files Paths or URLs"],
      "name": "Name"
    }
  }'
```

---

- App: https://pipedream.com/apps/lmnt.md · All apps: https://pipedream.com/apps
