搜索插件、代码仓与 APP 分类

flutter_sound 封面
插件详情v9.30.0

flutter_sound

一个完整的音频播放和录制API。Tau家族成员。音频播放器,音频录音机。为乌克兰祈祷。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
8.2万
喜欢数
1640
Pub 分数
140

安装插件

flutter pub add flutter_sound

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Flutter Sound 是一个全面的音频库,适用于 Flutter,可在多个平台上实现音频播放和录制。作为 'Tau' 家族的一部分,它为 Android、iOS、Web、macOS、Windows 和 Linux 上的音频任务提供统一的 API。设计时注重简单性和可靠性,支持多种音频格式,并提供实时音频处理等功能。该包包含音频播放器和录音器,非常适合需要强大音频功能的应用程序。其描述中还包含了一段诚挚的支持乌克兰的信息。

适合场景

  • 移动和桌面应用程序中的音频播放
  • 实时音频录制
  • 语音备忘录应用
  • 音乐播放器集成
  • 音频处理工作流程
  • 跨平台音频解决方案

主要特点

  • 支持播放和录制
  • 多平台兼容性
  • 跨平台统一 API
  • 实时音频处理
  • 内置音频格式支持
  • Tau家族生态系统的一部分

适合对象

  • 开发音频密集型应用的开发者
  • 跨平台音频应用
  • 需要语音录制的应用程序
  • 媒体播放器和播客应用
  • 教育或沟通工具

使用建议

  • 需要平台特定权限
  • 可能需要为 Web 额外配置
  • 由于原生依赖项导致包体积较大
  • 除了基本用法外,文档有限
  • 低端设备上可能存在性能开销

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

pub version Flutter Sound

Flutter Sound as a τ Project

Flutter Sound is a set of libraries which deal with audio :

  • A player for audio playback
  • A recorder for recording audio
  • Several utilities to handle audio files

Demo

Overview

Flutter Sound is a library package allowing you to play and record audio for :

  • iOS
  • Android
  • Web

The Flutter Sound package supports playback from:

  • Dart buffers
  • Assets
  • Files
  • Remote URL
  • Dart Streams

The Flutter Sound package supports recording to:

  • Dart buffers
  • Files
  • Dart Streams

SDK requirements

  • Flutter Sound requires an iOS 10.0 SDK (or later)
  • Flutter Sound requires an Android 21 (or later)
  • Flutter Sound is OK with the main Web browsers
    • Google Chrome
    • Firefox
    • Safari

Examples (Demo Apps)

Flutter Sound comes with several Demo/Examples.

You can run a live view of these examples here.

Features

The Flutter Sound package includes the following features :

  • Play and Record sound or music with various codecs. (See the supported codecs here)
  • Play local or remote files specified by their URL.
  • Play assets.
  • Play from a dart stream
  • Playback from a live dart Stream
  • Support for releasing/resuming resources when the app pauses/resumes.

Flutter Sound and Streams

Streams support is a main Flutter Sound feature that is very exciting.

  • Flutter Sound can record to a dart stream of audio data (PCM Float32 or PCM Int16). This let you process live audio data in dart, or send these data to a remote host.
  • Flutter Sound can playback from a dart stream of audio data (PCM Float32 or PCM Int16). This let play live audio data generated from dart (sequencer, sound generator, ...) or from a remote host.

You can look to the FS Streams guide.

License

  • Flutter Sound is published under the MPL-2.0 License.
  • Flutter Sound is copyrighted by Dooboolab and Canardoux.
  • Flutter Sound is now released under the permissive Mozilla license which has a weak copyleft clause: if you modify some of Flutter Sound code you must publish your modifications under the MPL license too. But you may publish your App with any license you want. Even a Proprietary/Closed-Sources License (shame on you!).
  • The Tau documentation is published under the Creative Commons CC BY-NC-SA 4.0 license.

The τ family

The Tau family begins to be rich :). It is composed by those following Flutter plugins.

  • Flutter Sound 9.x (this legacy plugin developed for many years)
  • Etau (which is a port on Flutter Web of the W3C Web Audio API)
  • Tauweb (which is the Etau implementation for Flutter Web)
  • Tauwar (which is the Etau implementation for Flutter on mobiles)
  • Taudio (which is (will be) something like Flutter Sound 10.0)

Architecture

Etau

This is (will be) an implementation on flutter of the W3C Web Audio API. Etau is actually in a developement state. It is an Alpha version. Even not a Beta version. There are many things to do before you can use it. Specially:

  • A documentation (TODO)
  • A support of the three main platforms:
    • Web
    • iOS (TODO)
    • Android (TODO)

The Web Audio API is terrific:

Because the Web Audio API is a W3C recommandation, you can find very good documentations on the Web. Of course, the Mozilla documentation but also documentation from other sources.

In a few words, the Web Audio API let you assembly nodes as a Node Chain, from a Source Node (perhaps the mic), to a Destination Node (perhaps the speaker), threw several nodes able to process the sound (echo, analyzer, panner, distorder, ...). But you really should look to the Mozilla documentation which is very good.

Now, you will have to ask yourself if you must use Taudio (which is just a wrapper around Etau), or directly Etau. The W3C recommandation is powerful but simple to use. There are probably no many reasons to use Taudio any longer.

Etau is (will be) released under the Gnu Public Licence v3 (GPL v3).

Taudio

The current Flutter Sound version is 9.x. Taudio is a new name for Flutter Sound 10.0. Taudio is actually in a developement state. It is an Alpha version. Even not a Beta version. There are many things to do before you can use it. Specially:

  • A documentation (TODO)
  • A support of the three main platforms:
    • Web (TODO)
    • iOS (TODO)
    • Android (TODO)

Taudio is (will be) released under the Gnu Public Licence v3 (GPL v3). This mean that if you don't want, cannot or maynot release your App under a GPL License, you must stuck with Flutter Sound 9.x. This is not a big deal: Flutter Sound v 9.x will be maintained for a forseable future.

Taudio is a complete rewritten of Flutter Sound 9.x. It keeps compatibility with the Flutter Sound 9.x API but adds a new wrapper above Etau.

Flutter Sound stands with Ukraine

PeaceForUkraine Peace for Ukraine

PrayForUkraine

We need help

{: .important } We greatly appreciate any contributions to the project which can be as simple as providing feedback on the API or documentation.

Actually, I am almost alone to maintain and develop three important projects :

  • Etau
  • Flutter Sound 9.x
  • Taudio (flutter Sound 10.0)

This is too much on my shoulders. We desesperatly need at least one other developer.

Thanks

{: .note }

If you like my work, you can click on the Thumb up button of the top of the pub.dev page.

This is free and this will reassure me that I do not spend most of my life for nobody.

所属分类

依赖

依赖清单 7 项

源码仓库

使用此插件的项目