Tag:

AVAudioRecorder不写出正确的WAV文件标题

我正在iPhone上使用AVAudioRecorder录制设备麦克风的audio,然后操作录制。 为了确保我正确地从文件中读取样本,我使用python的wave模块来查看它是否返回相同的样本。 但是,当试图打开由AVAudioRecorder保存的wav文件时,python的wave模块返回“fmt chunk和/或data chunk missing”。 这些是我用来logging文件的设置: [audioSettings setObject:[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey]; [audioSettings setObject:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey]; [audioSettings setObject:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey]; [audioSettings setObject:[NSNumber numberWithFloat:4096] forKey:AVSampleRateKey]; [audioSettings setObject:[NSNumber numberWithInt:1] forKey:AVNumberOfChannelsKey]; [audioSettings setObject:[NSNumber numberWithBool:YES] forKey:AVLinearPCMIsNonInterleaved]; [audioSettings setObject:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey]; 之后,我只是打电话recordForDuration实际上做logging。 录制成功 – 我可以播放文件等,我可以使用AudioFile服务读取示例,但是我无法validation它,因为我无法用Python的wave模块打开文件。 这是该文件的前128个字节的样子: 1215N:~/Downloads$ od -c –read-bytes 128 testFile.wav 0000000 RIFF x H 001 \0 WAVE fmt 0000020 […]

从任何音乐文件生成波形ios

我正在寻找如何根据音乐来绘制声波。 我想像这个形象的波。 这里是关于从音乐中显示Wave的一些讨论 IOS上的WaveForm 在iPhone上呈现波形 与iPhoneaudio波形可视化 Github示例链接 https://github.com/gyetvan-andras/cocoa-waveform https://github.com/benalavi/waveform https://github.com/JingWZ/WaveView https://github.com/gyetvan-andras/cocoa-waveform https://github.com/ioslovers/ATTabandHoldAudioRecord https://github.com/hezone/ECGWavesPlayer https://github.com/iluvcapra/JHWaveform 但对这种types的wavefrom没有任何想法,是否有可能像这样的图像画波? ?