# Sandbox.Npcs.Layers.SpeechLayer

Manages NPC speech state and plays sound files.

- Kind: class
- Namespace: `Sandbox.Npcs.Layers`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Npcs.Layers.BaseNpcLayer](/api/Sandbox.Npcs.Layers.BaseNpcLayer)

## Constructors

- [`SpeechLayer`](/api/Sandbox.Npcs.Layers.SpeechLayer/.ctor)

## Properties

- [`CanSpeak`](/api/Sandbox.Npcs.Layers.SpeechLayer/CanSpeak): Whether the cooldown has elapsed and the NPC can speak again.
- [`Cooldown`](/api/Sandbox.Npcs.Layers.SpeechLayer/Cooldown): Minimum seconds between speeches.
- [`CurrentSpeech`](/api/Sandbox.Npcs.Layers.SpeechLayer/CurrentSpeech): The subtitle text of the current line, if any. Synced to all clients.

## Methods

- [`Stop`](/api/Sandbox.Npcs.Layers.SpeechLayer/Stop): Stop any current speech and sound.
- [`TrySay`](/api/Sandbox.Npcs.Layers.SpeechLayer/TrySay)
