> For the complete documentation index, see [llms.txt](https://luadoc.edgetx.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://luadoc.edgetx.org/2.10/part_iii_-_opentx_lua_api_reference/general-functions-less-than-greater-than-luadoc-begin-general/playfile.md).

# playFile(filename \[, volume])

**Supported targets:** BW, COLOR

**Status:** current Introduced in 2.0.0, changed in 2.1.0, changed in 2.10<br>

## Parameters

* `filename` (string) full path to wav file (i.e. “/SOUNDS/en/system/tada.wav”)

  Introduced in 2.1.0: If you use a relative path, the current language is appended

  to the path (example: for English language: `/SOUNDS/en` is appended)
* `volume` (number): (1..5) override radio settings Wav volume for the duration of file. Omitting the parameter uses radio settings Wav volume

## Return value

none

## Examples

```lua
playFile("armed.wav", 5) -- play file armed.wav, use Wav volume 2
playFile("armed.wav", 1) -- play file armed.wav, use Wav volume 1
playFile("armed.wav")	 -- play file armed.wav, use radio settings Wav volume
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://luadoc.edgetx.org/2.10/part_iii_-_opentx_lua_api_reference/general-functions-less-than-greater-than-luadoc-begin-general/playfile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
