Youtubeのように音楽を流しながら音声入力するとエラーでアプリが落ちる
required condition is false: IsFormatSampleRateAndChannelCountValid(format)
AVAudioSessionの設定の問題のようでsetCategoryの第一引数を.recordから.playAndRecordに変えることで落ちなくなる
try audioSession.setCategory(.playAndRecord, mode: .measurement, options: .duckOthers)