# isPlayerTalking (Server)

> Tells whether a player is speaking on voice chat.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Voice
- **URL**: https://wiki.mymp.gg/en/isPlayerTalking-server
- **Counterpart**: Also exists on the client, with its own implementation: [isPlayerTalking (Client)](https://wiki.mymp.gg/en/isPlayerTalking-client.md)

## Syntax

```lua
bool isPlayerTalking(player player)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `player` | `player` | The player. |

## Returns

`true` while they speak, `false` if they are silent or `onPlayerVoiceStart` was cancelled for this speech.

## Example

```lua
setTimer(function()
    for _, player in ipairs(getElementsByType("player")) do
        setElementData(player, "talking", isPlayerTalking(player))
    end
end, 500, 0)
```

## See also

- [isPlayerTalking (Client)](https://wiki.mymp.gg/en/isPlayerTalking-client.md): Tells whether a player is speaking on voice chat, as this client sees it.
- [onPlayerVoiceStart (Server)](https://wiki.mymp.gg/en/onPlayerVoiceStart.md): Fired when a player starts speaking on voice chat. Cancelling the event makes nobody hear that speech.
- [onPlayerVoiceStop (Server)](https://wiki.mymp.gg/en/onPlayerVoiceStop.md): Fired when a player stops speaking on voice chat.
