Android MediaRecorder:AmrWb和ThreeGpp OutputFormat之间的差异

Android MediaRecorder:AmrWb和ThreeGpp OutputFormat之间的差异,android,mediarecorder,google-cloud-speech,audioformat,Android,Mediarecorder,Google Cloud Speech,Audioformat,如果我使用Android MediaRecorder录制i文件,我可以如下设置其属性: this.recorder.SetAudioSource(AudioSource.Mic); this.recorder.SetOutputFormat(OutputFormat.AmrWb); this.recorder.SetAudioEncoder(AudioEncoder.AmrWb); this.recorder.SetAudioSamplingRate(16000); 它生成一个3gpp文件。如

如果我使用Android MediaRecorder录制i文件,我可以如下设置其属性:

this.recorder.SetAudioSource(AudioSource.Mic);
this.recorder.SetOutputFormat(OutputFormat.AmrWb);
this.recorder.SetAudioEncoder(AudioEncoder.AmrWb);
this.recorder.SetAudioSamplingRate(16000);
它生成一个3gpp文件。如果我将录制的文件发送到谷歌云语音API,音频将被识别并转换为文本:

var response = speech.SyncRecognize(new RecognitionConfig()
            {
                Encoding = RecognitionConfig.Types.AudioEncoding.AmrWb,
                SampleRate = 16000,
                LanguageCode ="de-DE"
            }, RecognitionAudio.FromFile("test.3gpp"));
但是,如果我将OutputFormat更改为

this.recorder.SetOutputFormat(OutputFormat.ThreeGpp);
它还生成了一个.3gpp文件,但谷歌云API抛出了一个错误。这很奇怪,因为我认为OutputFormat并不重要,只是定义了编码数据的容器,在这两种情况下都是AMR编码的。所以我的问题是:


AMR和3GPP OutputFormat之间的具体区别是什么?

通常3GPP是一个视频容器,包含音频流(可以是AMR/AAC..)和视频流(可以是MP4),所以它是一个容器还是一种格式?“容器”和“音频格式”之间有什么区别?我一直认为音频文件由一个容器(定义文件扩展名)组成,其中包含头信息和一个或多个使用特定编解码器解码的音频数据。同样,我想知道为什么3gpp容器格式不适用于谷歌云语音api。