sound_analysis 0.0.2 copy "sound_analysis: ^0.0.2" to clipboard
sound_analysis: ^0.0.2 copied to clipboard

PlatformiOS
outdated

Flutter Plugin for iOS's Sound Analysis framework. At present, It primaryly provides a feature:tell you the result of sound analysis to a file.| The result lists every sound clip iOS can recognized,in [...]

logo
Note: Sound Analysis is only supported by iOS 15 or later

Installation #

1.open Terminal App
2.cd [your project's folder]
3.flutter add pub sound_analysis

Usage #

     import 'package:sound_analysis/sound_analysis.dart';
     import 'package:path/path.dart' as path;
     import 'package:path_provider/path_provider.dart';
    
     List<String> audios = await SoundAnalysis.knownClassifications(SoundAnalysis.SNClassifierIdentifier_version1);
     print("audios === ${audios}");
 
      Directory directory = await getApplicationDocumentsDirectory();
      var videoFilePath = path.join(directory.path,"t2.mp4");
      File file = File(videoFilePath);
      if (!file.existsSync()){
        ByteData data = await rootBundle.load("assets/t2.mp4");
        List<int> bytes = data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);
        file.writeAsBytesSync(bytes,flush: true);
      }
      List<Map<String,dynamic>> clips = await SoundAnalysis.analyzeAudioFile(SoundAnalysis.SNClassifierIdentifier_version1, videoFilePath);
      print("audio clips:${clips}");
   
4
likes
125
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter Plugin for iOS's Sound Analysis framework. At present, It primaryly provides a feature:tell you the result of sound analysis to a file.| The result lists every sound clip iOS can recognized,including its name,range,and confidence.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on sound_analysis

Packages that implement sound_analysis