# AudioAsset.getDuration
Gets the duration of the audio in seconds

{/* Do not edit this file. It is automatically generated by API Documenter. */}

## AudioAsset.getDuration() method

Gets the duration of the audio in seconds

**Signature:**

```typescript
getDuration(): Promise<number | null>;
```

**Returns:**

Promise\<number | null>

A promise that resolves to the duration, or null if it cannot be determined

## Example

```ts
const seconds = await audioAsset.getDuration();
```
