-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pyannote for speaker detection (WIP, works only in macOS unit tests)
- Loading branch information
Showing
15 changed files
with
911 additions
and
5 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import 'dart:typed_data'; | ||
|
||
import 'pyannote_none.dart' | ||
if (dart.library.io) 'pyannote_native.dart' | ||
if (dart.library.js) 'pyannote_web.dart'; | ||
|
||
abstract class Pyannote { | ||
static Pyannote? _instance; | ||
String get modelPath; | ||
String get modelName; | ||
|
||
static Pyannote load(String path, String modelName) { | ||
_instance ??= getPyannote(path, modelName); | ||
return _instance!; | ||
} | ||
|
||
/// Process audio data and return speaker segments | ||
/// | ||
/// Returns a list of segments. For regular segmentation models: | ||
/// ```dart | ||
/// { | ||
/// 'speaker': int, // Speaker index | ||
/// 'start': double, // Start time in seconds | ||
/// 'stop': double, // End time in seconds | ||
/// } | ||
/// ``` | ||
/// | ||
/// For short_scd_bigdata model: | ||
/// ```dart | ||
/// { | ||
/// 'timestamp': double, // Change point time in seconds | ||
/// } | ||
/// ``` | ||
Future<List<Map<String, dynamic>>> process(Float32List audioData, {double? step}); | ||
} |
Oops, something went wrong.