# SpannedSubject.VoiceText

# SpannedSubject.VoiceText

Artifact:[androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/truth/SpannedSubject.java+class:androidx.media3.test.utils.truth.SpannedSubject.VoiceText)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.VoiceText "View this page in Java")

<br />

```
interface SpannedSubject.VoiceText
```

<br />

*** ** * ** ***

Allows assertions about a span's voice its position.

## Summary

|                                                             ### Public functions                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SpannedSubject.AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)`!` | [withName](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.VoiceText#withName(java.lang.String))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!)` Checks that at least one of the matched spans has the expected`name`. |

## Public functions

### withName

```
fun withName(name: String!): SpannedSubject.AndSpanFlags!
```

Checks that at least one of the matched spans has the expected`name`.  

|                                          Parameters                                          |
|----------------------------------------------------------------------------------------------|---------------------------------|
| `name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | The expected name of the voice. |

|                                                                    Returns                                                                    |
|-----------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SpannedSubject.AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)`!` | A[AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)object for optional additional assertions on the flags. |