From be9f0b51275c479203c89459921a6c5fb74dbd2f Mon Sep 17 00:00:00 2001 From: tnoho Date: Sun, 3 Sep 2023 23:38:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E5=90=8D=E5=89=8D=E3=81=AE=E3=81=AA?= =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=9F=E5=BC=95=E6=95=B0=E3=81=AB=E5=90=8D?= =?UTF-8?q?=E5=89=8D=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sora_sdk_ext.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/sora_sdk_ext.cpp b/src/sora_sdk_ext.cpp index 1c1709a6..b3d7a624 100644 --- a/src/sora_sdk_ext.cpp +++ b/src/sora_sdk_ext.cpp @@ -179,35 +179,43 @@ NB_MODULE(sora_sdk_ext, m) { .def("set_enabled", &SoraTrackInterface::set_enabled, "enable"_a); nb::class_(m, "SoraAudioSource") - .def("on_data", nb::overload_cast( - &SoraAudioSource::OnData)) .def("on_data", - nb::overload_cast(&SoraAudioSource::OnData)) + nb::overload_cast( + &SoraAudioSource::OnData), + "data"_a, "samples_per_channel"_a, "timestamp"_a) + .def("on_data", + nb::overload_cast(&SoraAudioSource::OnData), + "data"_a, "samples_per_channel"_a) .def("on_data", nb::overload_cast, nb::c_contig, nb::device::cpu>, - double>(&SoraAudioSource::OnData)) + double>(&SoraAudioSource::OnData), + "ndarray"_a, "timestamp"_a) .def("on_data", nb::overload_cast, nb::c_contig, nb::device::cpu>>( - &SoraAudioSource::OnData)); + &SoraAudioSource::OnData), + "ndarray"_a); nb::class_(m, "SoraVideoSource") .def( "on_captured", nb::overload_cast, nb::c_contig, nb::device::cpu>>( - &SoraVideoSource::OnCaptured)) + &SoraVideoSource::OnCaptured), + "ndarray"_a) .def( "on_captured", nb::overload_cast, nb::c_contig, nb::device::cpu>, - double>(&SoraVideoSource::OnCaptured)) + double>(&SoraVideoSource::OnCaptured), + "ndarray"_a, "timestamp"_a) .def( "on_captured", nb::overload_cast, nb::c_contig, nb::device::cpu>, - int64_t>(&SoraVideoSource::OnCaptured)); + int64_t>(&SoraVideoSource::OnCaptured), + "ndarray"_a, "timestamp_us"_a); nb::class_(m, "SoraAudioSinkImpl", nb::type_slots(audio_sink_slots)) From a10a36cc4303938e46a05906e1755404db52f552 Mon Sep 17 00:00:00 2001 From: tnoho Date: Mon, 4 Sep 2023 00:18:44 +0900 Subject: [PATCH 2/3] =?UTF-8?q?SoraVAD::Analyze=20=E3=81=AE=E5=BC=95?= =?UTF-8?q?=E6=95=B0=E3=81=AB=E3=82=82=E5=90=8D=E5=89=8D=E3=81=8C=E3=81=AA?= =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sora_sdk_ext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sora_sdk_ext.cpp b/src/sora_sdk_ext.cpp index b3d7a624..5b35a9fe 100644 --- a/src/sora_sdk_ext.cpp +++ b/src/sora_sdk_ext.cpp @@ -261,7 +261,7 @@ NB_MODULE(sora_sdk_ext, m) { nb::class_(m, "SoraVAD") .def(nb::init<>()) - .def("analyze", &SoraVAD::Analyze); + .def("analyze", &SoraVAD::Analyze, "frame"_a); nb::class_(m, "SoraVideoFrame") .def("data", &SoraVideoFrame::Data, nb::rv_policy::reference); From e23937111b67bcbd2aa2b53419ef86946da5a3a8 Mon Sep 17 00:00:00 2001 From: tnoho Date: Mon, 4 Sep 2023 23:25:44 +0900 Subject: [PATCH 3/3] =?UTF-8?q?CHANGES=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 7b69ae43..da4a8004 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,8 @@ ## develop +- [CHANGE] SoraAudioSource.on_data, SoraVideoSource.on_captured, SoraVAD.analyze の引数名を変更 + - @tnoho - [ADD] 発話区間の検出が可能な SoraVAD の追加 - @tnoho - [ADD] リアルタイム性を重視した AudioStreamSink の追加