---title: CallPlayback---Represents a current or past playback in a call. You can obtain instances of this class by starting a Playback with one of the following methods:- [Call.play](./voice-call.mdx#play)- [Call.playAudio](./voice-call.mdx#playaudio)- [Call.playRingtone](./voice-call.mdx#playringtone)- [Call.playSilence](./voice-call.mdx#playsilence)- [Call.playTTS](./voice-call.mdx#playtts)#### ExamplePlaying a text-to-speech message and waiting for it to end before proceeding tothe next instructions.jsimport { Voice } from @signalwire/realtime-api;const client = new Voice.Client({ project: , token: , contexts: [office],});const call = await client.dialPhone({ from: +YYYYYYYYYY, to: +XXXXXXXXXX,});const playback = await call.playTTS({ text: Welcome to SignalWire! });await playback.ended();## Accessors### id• get **id**(): stringThe unique id for this playback.#### Returnsstring## Methods### pause▸ **pause**(): Promise<[CallPlayback](./callplayback.mdx)\>Pauses the playback.#### ReturnsPromise<[CallPlayback](./callplayback.mdx)\>#### Examplejsconst playback = await call.playAudio({ url: https://cdn.signalwire.com/default-music/welcome.mp3,});await playback.pause();---### ended▸ **ended**(): Promise<[CallPlayback](./callplayback.mdx)\>Returns a promise that is resolved only after this playback finishes playing (or is stopped).#### ReturnsPromise<[CallPlayback](./callplayback.mdx)\>#### Examplejsconst playback = await call.playAudio({ url: https://cdn.signalwire.com/default-music/welcome.mp3,});await playback.ended();---### resume▸ **resume**(): Promise<[CallPlayback](./callplayback.mdx)\>Resumes the playback if it was paused.#### ReturnsPromise<[CallPlayback](./callplayback.mdx)\>#### Examplejsconst playback = await call.playAudio({ url: https://cdn.signalwire.com/default-music/welcome.mp3,});await playback.resume();---### setVolume▸ **setVolume**(volume): Promise<[CallPlayback](./callplayback.mdx)\>Changes the volume of the playback.#### Parameters| Name | Type | Description || :------- | :------- | :------------------------------------ || volume | number | Volume value between -40dB and +40dB. |#### ReturnsPromise<[CallPlayback](./callplayback.mdx)\>#### Examplejsconst playback = await call.playAudio({ url: https://cdn.signalwire.com/default-music/welcome.mp3,});await playback.setVolume(-20);---### stop▸ **stop**(): Promise<[CallPlayback](./callplayback.mdx)\>Stops the playback.#### ReturnsPromise<[CallPlayback](./callplayback.mdx)\>#### Examplejsconst playback = await call.playAudio({ url: https://cdn.signalwire.com/default-music/welcome.mp3,});await playback.stop();---### ~~waitForEnded~~▸ **waitForEnded**(): Promise<[CallPlayback](./callplayback.mdx)\>Returns a promise that is resolved only after this playback finishes playing (or is stopped).:::cautionThis method is deprecated. See [ended](#ended) instead.:::