# getSoundMetaTags (Client)

> Reads the audio file's tags (MP3's ID3, OGG's and FLAC's comments, WAV's INFO).

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Sound
- **URL**: https://wiki.mymp.gg/en/getSoundMetaTags

## Syntax

```lua
table|string|false getSoundMetaTags(sound sound [, string format = ""])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `sound` | `sound` | The `sound` element, or a `dui` element for the browser's sound. |
| `format` | `string` | A tag format such as `%ARTI - %TITL`. Empty returns the table of all tags. *(default: `""`)* |

## Returns

Without `format`, a table of the fields the file has: `title`, `artist`, `album`, `genre`, `year`, `comment`, `track`, `composer`, `copyright`, `subtitle`, `album_artist`. With `format`, the text it builds. `false` if that text is empty or the sound was not found.

## Example

```lua
local music = playSound("sounds/track.mp3")
local tags = getSoundMetaTags(music)
outputDebugString(("Now playing: %s - %s"):format(tags.artist or "?", tags.title or "?"))
```

## See also

- [getSoundLength (Shared)](https://wiki.mymp.gg/en/getSoundLength.md): Returns the sound's length.
- [playSound (Client)](https://wiki.mymp.gg/en/playSound-client.md): Plays a sound with no position in the world, on this client only. Fires onClientSoundStarted with the reason play.
