将录制的声音文件转换为 flac 格式 (xamarin ios) [英] Convert recorded sound file to flac format (xamarin ios)

查看:31
本文介绍了将录制的声音文件转换为 flac 格式 (xamarin ios)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 AvAudioRecorder (xamarin) 在 iPhone 上录制声音.如何使用 C#(用于谷歌语音 api)将音频文件转换为 .FLAC 格式?

I record the sound of on iPhone using AvAudioRecorder (xamarin). How convert audio file to .FLAC format using C# (for google speech api) ?

推荐答案

目前没有 C# wav-to-flac 转换器.

There isn't a C# wav-to-flac converter right now.

您可以简单地将 FLACiOSwav-to-flac 嵌入到 xcode 项目中的文件.

You could simply use FLACiOS with wav-to-flac files embedded into a project in xcode.

然后使用

public partial class NativeMethods 
{
    [DllImport("__Internal", 
        EntryPoint="convertWavToFlac", 
        CallingConvention = CallingConvention.Cdecl)]
    public static extern int FlacEncode(
        [MarshalAs(UnmanagedType.LPStr)] string wav_file, 
        [MarshalAs(UnmanagedType.LPStr)] string flac_file) ;

}

只需使用绑定本机方法将您的 wav 转换为 flac.

and just use bound native method to convert your wav to flac.

这篇关于将录制的声音文件转换为 flac 格式 (xamarin ios)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆