You can write this like this:

```rb
filename = if "wav".eql? file_format
  @filename
else
 ...
  temp_wav.path
end
```