问题描述
我正在寻找在Windows Phone上的wma(或mp3,ogg等)中对wav文件进行编码的方法.我没有在线找到任何资源.关于如何归档此文件的任何想法?
I am looking to encode a wav file in wma (or mp3, ogg, etc) on Windows Phone. I have not found any resources online. Any ideas on how I can archive this?
我正在尝试从麦克风录制语音并从电话上传.这就是为什么我更喜欢在发送音频文件之前先对其进行压缩.
I am trying to record a voice from the microphone and upload it from the phone. That's why I prefer to compress the audio file before sending it.
推荐答案
从Windows Phone 8.1开始,您可以使用 MediaTranscoder类.
Starting from Windows Phone 8.1, you can use MediaTranscoder class for that.
此外,自WP 8.0起,您可以使用AudioVideoCaptureDevice直接将其录制为压缩格式.不幸的是,此方法都不支持MP3或WMA,但是您可以在 AAC 和 AMR 编解码器. 这里是示例代码.
Also, since WP 8.0 you can use AudioVideoCaptureDevice to record directly into the compressed format. Unfortunately for you, neither MP3 or WMA is supported with this method, but you can choose between AAC and AMR codecs. Here's a sample code.
这篇关于在Windows Phone 8上将wav文件压缩为wma的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!