Camerax Videocapture用例。访问AudioreCord对象的访问以显示语音可视化

发布于 2025-02-09 16:04:13 字数 76 浏览 4 评论 0原文

我需要显示用于待处理视频录制的输入音频级别图。我正在使用camerax SDK和视频贴身用例。是否可以访问如此低级别的API进行视频录制?

I need to display input audio level graph for pending video recording. I am using CameraX SDK and VideoCapture use case. Is it possible to access such a low level API for video recording?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夏雨凉 2025-02-16 16:04:13

可能不是,至少我没有找到任何选择我的问题,

我的问题与您相同,可以解决它,我使用camera2和mediarecorder
您可以使用Mediarecorder.maxamplitude获取有关“音量”的

信息“ rel =“ nofollow noreferrer”>也可以尝试此,但无论如何您都需要使用Mediarecorder
我没有得到这样的方式,请对我发表评论

还谈到了反思,但是如果您找到如何使用Camerax,

Probably not, at least I didn't find any options to do it

I have same problem as u, to resolve it I use camera2 and MediaRecorder
U can use MediaRecorder.maxAmplitude to get info about "volume"

Also u can try this, but anyway u need to use MediaRecorder
There is also spoken about reflection, but I didn't got how to get volume in that way

If u find how to do it with cameraX, please comment me

尽揽少女心 2025-02-16 16:04:13

当您开始在Camerax 1.3.0录制时,您可以收到不同的事件。其中之一是videorecordevent.status其中包含音频振幅

val pendingRecording = recorder.prepareRecording(activity, options).withAudioEnabled()

pendingRecording.start(cameraExecutor) { event ->
  when (event) {
     is VideoRecordEvent.Status -> {
      event.recordingStats.audioStats.audioAmplitude
     }
  }
}

When you start recording in camerax 1.3.0 you can receive different events. One of them is VideoRecordEvent.Status where it contains audioamplitude

val pendingRecording = recorder.prepareRecording(activity, options).withAudioEnabled()

pendingRecording.start(cameraExecutor) { event ->
  when (event) {
     is VideoRecordEvent.Status -> {
      event.recordingStats.audioStats.audioAmplitude
     }
  }
}

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文