---
name: "getVoiceList"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.0" }
title: "Robot Voice"
---

## getVoiceList

> [VERSION] Base Library >= 2.21.0

### Description

Get the robot vacuum's voice pack list

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `GetVoiceListParams` | Yes | Parameter object containing the device ID and pagination info |

### Return Value

Type: `Promise<GetVoiceListResponse>`

Promise that resolves to the voice pack list, current page, and total count

##### GetVoiceListResponse

| Property | Type | Description |
| --- | --- | --- |
| `datas` | `VoiceItem[]` | Voice pack data array |
| `pageNo` | `number` | Current page |
| `totalCount` | `number` | Total count |

### Referenced Types

##### `interface` GetVoiceListParams

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID |
| `deviceId` | `string` | Device ID (compatibility field) |
| `offset` | `number` | Pagination offset; when there are few voice packs, pass 0 |
| `limit` | `number` | Page size, recommended 100 |

##### `interface` VoiceItem

| Property | Type | Description |
| --- | --- | --- |
| `auditionUrl` | `string` | Preview URL |
| `desc` | `string` | Description (optional) |
| `extendData` | `VoiceExtendData` | Extension data |
| `id` | `number` | Voice pack ID |
| `imgUrl` | `string` | Cover image URL |
| `name` | `string` | Voice pack name |
| `officialUrl` | `string` | Official download URL |
| `productId` | `string` | Product ID |
| `region` | `string[]` | Array of available region codes |

##### `interface` VoiceExtendData

| Property | Type | Description |
| --- | --- | --- |
| `extendId` | `number` | Extension ID; compare with the device-reported language pack ID to determine whether it is in use |
| `version` | `string` | Version |


### Examples

```js
const result = await ty.getVoiceList({
  devId: 'your-device-id',
  offset: 0,
  limit: 100,
});
console.log(result.datas, result.totalCount);
```
