# VoiceSpan

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/common/text/VoiceSpan "View this page in Java")

<br />

```
@UnstableApi
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 constructors                                                                                                   |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [VoiceSpan](https://developer.android.com/reference/kotlin/androidx/media3/common/text/VoiceSpan#VoiceSpan(java.lang.String))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!)` |

|                                                ### Public functions                                                |
|--------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[VoiceSpan](https://developer.android.com/reference/kotlin/androidx/media3/common/text/VoiceSpan)`!` | [fromBundle](https://developer.android.com/reference/kotlin/androidx/media3/common/text/VoiceSpan#fromBundle(android.os.Bundle))`(bundle: `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`!)` |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)`!`                                        | [toBundle](https://developer.android.com/reference/kotlin/androidx/media3/common/text/VoiceSpan#toBundle())`()`                                                                                                         |

|                                ### Public properties                                 |
|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [name](https://developer.android.com/reference/kotlin/androidx/media3/common/text/VoiceSpan#name()) The voice name. |

## Public constructors

### VoiceSpan

```
VoiceSpan(name: String!)
```  

## Public functions

### fromBundle

```
java-static fun fromBundle(bundle: Bundle!): VoiceSpan!
```  

### toBundle

```
fun toBundle(): Bundle!
```  

## Public properties

### name

```
val name: String!
```

The voice name.