Skip to content

Commit

Permalink
Doc for speaker diarization (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Oct 13, 2024
1 parent debb1d2 commit e24568e
Show file tree
Hide file tree
Showing 17 changed files with 173 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/build-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
./generate-tts.py
./generate-tts-engine.py
./generate-speaker-identification.py
./generate-speaker-diarization.py
./generate-audio-tagging.py
./generate-audio-tagging-wearos.py
./generate-slid.py
Expand All @@ -122,6 +123,7 @@ jobs:
mv -v apk.html ../build/html/onnx/tts/
mv -v apk-engine.html ../build/html/onnx/tts/
mv -v apk-speaker-identification.html ../build/html/onnx/speaker-identification/apk.html
mv -v apk-speaker-diarization.html ../build/html/onnx/speaker-diarization/apk.html
mv -v apk-audio-tagging.html ../build/html/onnx/audio-tagging/apk.html
mv -v apk-audio-tagging-wearos.html ../build/html/onnx/audio-tagging/apk-wearos.html
mv -v apk-slid.html ../build/html/onnx/spoken-language-identification/apk.html
Expand All @@ -134,6 +136,7 @@ jobs:
mv -v apk-cn.html ../build/html/onnx/tts/
mv -v apk-engine-cn.html ../build/html/onnx/tts/
mv -v apk-speaker-identification-cn.html ../build/html/onnx/speaker-identification/apk-cn.html
mv -v apk-speaker-diarization-cn.html ../build/html/onnx/speaker-diarization/apk-cn.html
mv -v apk-audio-tagging-cn.html ../build/html/onnx/audio-tagging/apk-cn.html
mv -v apk-audio-tagging-wearos-cn.html ../build/html/onnx/audio-tagging/apk-wearos-cn.html
mv -v apk-slid-cn.html ../build/html/onnx/spoken-language-identification/apk-cn.html
Expand Down
5 changes: 4 additions & 1 deletion docs/source/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ The differences are compared below:
| C#, Java, Kotlin,
| Swift, Go,
| JavaScript, Dart
| Pascal, Rust
- | C, C++, Python,
| C#, Kotlin,
| Swift, Go
Expand All @@ -71,13 +72,15 @@ The differences are compared below:
- | streaming speech recognition,
| non-streaming speech recognition,
| text-to-speech,
| speaker diarization,
| speaker identification,
| speaker verification,
| spoken language identification,
| audio tagging,
| VAD,
| keyword spotting,
- streaming speech recognition
- | streaming speech recognition,
| VAD,

We also support `Triton`_. Please see :ref:`triton_overview`.
1 change: 1 addition & 0 deletions docs/source/onnx/android/build-sherpa-onnx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and ``text-to-speech`` (TTS).
- ``SherpaOnnxVad``
- ``SherpaOnnxVadAsr``
- ``SherpaOnnxSpeakerIdentification``
- ``SherpaOnnxSpeakerDiarization``
- ``SherpaOnnxAudioTagging``
- ``SherpaOnnxAudioTaggingWearOs``

Expand Down
6 changes: 6 additions & 0 deletions docs/source/onnx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ Also, we show how to use it for speech recognition with pre-trained models.
./pretrained_models/index
./sense-voice/index

.. toctree::
:maxdepth: 5
:caption: Speaker diarization

./speaker-diarization/index

.. toctree::
:maxdepth: 5
:caption: Speaker Identification
Expand Down
21 changes: 21 additions & 0 deletions docs/source/onnx/speaker-diarization/android.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Android APKs for speaker diarization
====================================

You can find Android APKs for speaker diarization at the following page

`<https://k2-fsa.github.io/sherpa/onnx/speaker-diarization/apk.html>`_

For users from China, you can also visit

`<https://k2-fsa.github.io/sherpa/onnx/speaker-diarization/apk-cn.html>`_


The source code for the APKs can be found at

`<https://github.com/k2-fsa/sherpa-onnx/tree/master/android/SherpaOnnxSpeakerDiarization>`_

You can find the script for building the APKs at

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/scripts/apk/build-apk-speaker-diarization.sh>`_

Please see :ref:`sherpa-onnx-android` for more details.
8 changes: 8 additions & 0 deletions docs/source/onnx/speaker-diarization/c.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
C API examples
==============

Please see

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/c-api-examples/offline-speaker-diarization-c-api.c>`_

and :ref:`sherpa-onnx-c-api`.
6 changes: 6 additions & 0 deletions docs/source/onnx/speaker-diarization/cpp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
C++ API examples
================

Please see

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/sherpa-onnx/csrc/sherpa-onnx-offline-speaker-diarization.cc>`_
6 changes: 6 additions & 0 deletions docs/source/onnx/speaker-diarization/csharp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
C# API examples
===============

Please see

`<https://github.com/k2-fsa/sherpa-onnx/tree/master/dotnet-examples/offline-speaker-diarization>`_
6 changes: 6 additions & 0 deletions docs/source/onnx/speaker-diarization/dart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Dart API examples
=================

Please see

`<https://github.com/k2-fsa/sherpa-onnx/tree/master/dart-api-examples/speaker-diarization>`_
6 changes: 6 additions & 0 deletions docs/source/onnx/speaker-diarization/go.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Go API examples
===============

Please see

`<https://github.com/k2-fsa/sherpa-onnx/tree/master/go-api-examples/non-streaming-speaker-diarization>`_
32 changes: 32 additions & 0 deletions docs/source/onnx/speaker-diarization/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Speaker Diarization
===================

This page describes how to use `sherpa-onnx`_ for speaker diarization.

Pre-trained models for speaker segmentation can be found
at `<https://github.com/k2-fsa/sherpa-onnx/releases/tag/speaker-segmentation-models>`_

Pre-trained models for speaker embedding extraction can be found
at `<https://github.com/k2-fsa/sherpa-onnx/releases/tag/speaker-recongition-models>`_

.. hint::



In the following, we describe different programming language APIs for speaker diarization.

.. toctree::
:maxdepth: 5

./android.rst
./c.rst
./cpp.rst
./csharp.rst
./dart.rst
./go.rst
./java.rst
./javascript.rst
./kotlin.rst
./pascal.rst
./python.rst
./swift.rst
9 changes: 9 additions & 0 deletions docs/source/onnx/speaker-diarization/java.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Java API examples
=================

Please see

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/java-api-examples/OfflineSpeakerDiarizationDemo.java>`_

and :ref:`sherpa-onnx-java-api`.

36 changes: 36 additions & 0 deletions docs/source/onnx/speaker-diarization/javascript.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
JavaScript API examples
=======================

We provide two npm packages.

WebAssembly based npm package
-----------------------------

You can find the package at

`<https://www.npmjs.com/package/sherpa-onnx>`_

This package does not support multi-threading.

The example for speaker diarzation can be found at

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/nodejs-examples/test-offline-speaker-diarization.js>`_

node-addon based npm package
----------------------------

You can find the package at

`<https://www.npmjs.com/package/sherpa-onnx-node>`_

This package supports multi-threading.

Please see

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/nodejs-addon-examples/README.md#introduction>`_

for installation.

The example for speaker diarization can be found at

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/nodejs-addon-examples/test_offline_speaker_diarization.js>`_
6 changes: 6 additions & 0 deletions docs/source/onnx/speaker-diarization/kotlin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Kotlin API examples
===================

Please see

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/kotlin-api-examples/test_offline_speaker_diarization.kt>`_
7 changes: 7 additions & 0 deletions docs/source/onnx/speaker-diarization/pascal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Pascal API examples
===================

Please see

`<https://github.com/k2-fsa/sherpa-onnx/tree/master/pascal-api-examples/speaker-diarization>`_

10 changes: 10 additions & 0 deletions docs/source/onnx/speaker-diarization/python.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Python API examples
===================

.. note::

You need to install `sherpa-onnx>=1.10.28`.


Please see `<https://github.com/k2-fsa/sherpa-onnx/blob/master/python-api-examples/offline-speaker-diarization.py>`_
for usages.
6 changes: 6 additions & 0 deletions docs/source/onnx/speaker-diarization/swift.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Swift API examples
==================

Please see

`<https://github.com/k2-fsa/sherpa-onnx/blob/master/swift-api-examples/speaker-diarization.swift>`_

0 comments on commit e24568e

Please sign in to comment.