# Start speaker detection for a project

- **Method:** `POST`
- **Path:** `/api/v1/audiobook/projects/{project_id}/assign-speakers`
- **Operation ID:** `audiobook_assign_speakers_api_v1_audiobook_projects__project_id__assign_speakers_post`
- **Tags:** Audiobook

## Effective servers

- `http://127.0.0.1:8100`

  Voice Creator Pro on this computer

## Path parameters

- **`project_id` (required)**: `string`

## Request body

**Content type:** `application/json`

`object | null`, schema: `AudiobookAssignSpeakersRequest`

- **`detect_emotions`**: `boolean`, default: `false`

  Also pick a delivery emotion for each line
- **`mode`**: `string`, default: `"speakers"`

  'speakers' to attribute dialogue, 'emotions' to only mark narration emotion, 'both' to attribute then mark emotion in one run

**Example:**

```json
{
  "detect_emotions": false,
  "mode": "speakers"
}
```

## Responses

### 200 Successful Response

**Content type:** `application/json`

`any`

**Example:**

```json
null
```

### 422 Validation Error

**Content type:** `application/json`

schema: `HTTPValidationError`

- **`detail`**: `array`

  **Items:**

  schema: `ValidationError`
  - **`loc` (required)**: `array of (string | integer)`
  - **`msg` (required)**: `string`
  - **`type` (required)**: `string`
  - **`ctx`**: `object`
  - **`input`**: `any`

**Example:**

```json
{
  "detail": [
    {
      "loc": [
        ""
      ],
      "msg": "",
      "type": "",
      "input": null,
      "ctx": {}
    }
  ]
}
```

## Schemas

- `AudiobookAssignSpeakersRequest` — shown above.
- `HTTPValidationError` — shown above.
- `ValidationError` — shown above.
