---
title: "DisposeSpeechChannel(_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1462081-disposespeechchannel
---

# DisposeSpeechChannel(_:)

Disposes of an existing speech channel.

## Declaration

```swift
func DisposeSpeechChannel(_ chan: SpeechChannel) -> OSErr
```

## Parameters

- `chan`: The speech channel to dispose of.

## Return Value

Return Value A resultcode. See Result Codes.

## Discussion

Discussion The DisposeSpeechChannel functiondisposes of the speech channel specified in the chan parameterand releases all memory the channel occupies. If the speech channelspecified is producing speech, then the DisposeSpeechChannel functionimmediately stops speech before disposing of the channel. If youhave defined a text-done callback function or a speech-done callbackfunction, the function will not be called before the channel is disposedof. The Speech Synthesis Manager releases any speech channelsthat have not been explicitly disposed of by an application whenthe application quits. In general, however, your application shoulddispose of any speech channels it has created whenever it receivesa suspend event. This ensures that other applications can take fulladvantage of Speech Synthesis Manager and Sound Manager capabilities.

## See Also

### Managing Speech Channels

- [NewSpeechChannel(_:_:)](applicationservices/1461367-newspeechchannel.md)
