# VoiceSpan

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/text/VoiceSpan.java+class:androidx.media3.common.text.VoiceSpan)

*** ** * ** ***


```
@UnstableApi
public final class VoiceSpan
```

<br />

*** ** * ** ***

A span representing the speaker of the spanned text.

For example a [WebVTT voice span](https://www.w3.org/TR/webvtt1/#webvtt-cue-voice-span).

## Summary

| ### Public fields |
|---|---|
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/common/text/VoiceSpan#name()` The voice name. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/common/text/VoiceSpan#VoiceSpan(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/common/text/VoiceSpan` | `https://developer.android.com/reference/androidx/media3/common/text/VoiceSpan#fromBundle(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle.html bundle)` |
| `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/androidx/media3/common/text/VoiceSpan#toBundle()()` |

## Public fields

### name

```
public final String name
```

The voice name.

## Public constructors

### VoiceSpan

```
public VoiceSpan(String name)
```

## Public methods

### fromBundle

```
public static VoiceSpan fromBundle(Bundle bundle)
```

### toBundle

```
public Bundle toBundle()
```