---
title: AudioData.sampleRate
slug: Web/API/AudioData/sampleRate
tags:
  - API
  - Property
  - Reference
  - sampleRate
  - AudioData
browser-compat: api.AudioData.sampleRate
---
{{DefaultAPISidebar("WebCodecs API")}}

The **`sampleRate`** read-only property of the {{domxref("AudioData")}} interface returns the sample rate in Hz.

### Value

A decimal value.

## Examples

The below example prints the value of `sampleRate` to the console.

```js
console.log(AudioData.duration);
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
