flutter桌面平台如何录音?
我想在flutter桌面平台上录制语音。
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1526], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.5)
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
[√] Connected device (4 available)
I want to record voice on flutter desktop platform.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1526], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.5)
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
[√] Connected device (4 available)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 record 包,
步骤 1:声明用于存储录音数据的变量:
步骤 2:创建启动方法:
第 3 步:创建用于启动、停止、恢复、暂停录制的方法:
第 4 步:声明启动计时器的方法:
第 5 步:结束时处置录制器:
在您的 ui 中使用这些方法。
Use record package,
Step 1: Declare variable for storing audio recording data:
Step 2: Create initiate method:
Step 3: Create methods for starting, stopping, resuming, pausing recording:
Step 4: Declare method for starting timer:
Step 5: Dispose recorder at end:
Use these methods in your ui.
您是否尝试过可用的 flutter 软件包?如果没有,请尝试使用 flutter_desktop_audio_recorder 或 记录。两者都支持Windows。
请按照自述文件部分了解实施细节。
Have you tried with the available flutter packages? If not, then try with flutter_desktop_audio_recorder or record. Both of them supports Windows.
Please follow the readme section for implementation details.