是否可以将原始文件转换为python中的文本?

时间:2016-03-07 15:41:04

标签: python-2.7 text binary binaryfiles

我使用

从“.wav”文件生成了一个原始文件
sox out/out/output$num.mp3 -c 1 -r 16000 out/raw/poke$num.raw

这生成了一个原始文件,如下所示: YY \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \00ÿÿÿÿ\ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \00ÿÿ\ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \00ÿÿ\ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \ 00 \00ÿÿÿÿÿÿ\ 00 \ 00 \ 00 \00ÿÿ\ 00 \ 00 \00ÿÿ\ 0

甚至可以在python中将其转换为文本文件吗?

0 个答案:

没有答案