Byte arrary to double array?

It’s not really a simple case of transforming a byte to a double in this case.

You would need to understand the file format first and create a parser for it WAV - Waveform Audio File Format

alternatively find a library that can do it for you. A quick google search yields GitHub - mziccard/scala-audio-file: Minimal Scala library to process audio files but there are probably others.