From d4896817839de31bef2db8f676706ac7cbfa23a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:24:53 +0000 Subject: [PATCH 1/7] Bump h2 from 0.3.25 to 0.3.26 in /src-tauri Bumps [h2](https://github.com/hyperium/h2) from 0.3.25 to 0.3.26. - [Release notes](https://github.com/hyperium/h2/releases) - [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md) - [Commits](https://github.com/hyperium/h2/compare/v0.3.25...v0.3.26) --- updated-dependencies: - dependency-name: h2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src-tauri/Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 1a94ba3..6063de0 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1987,9 +1987,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -2169,7 +2169,7 @@ dependencies = [ "httpdate", "itoa 1.0.10", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.4.10", "tokio", "tower-service", "tracing", From ba9db5e5ed5b125ccd227ea4f246eb791d0cdb80 Mon Sep 17 00:00:00 2001 From: mohemohe Date: Sat, 6 Apr 2024 05:05:35 +0900 Subject: [PATCH 2/7] Fixed UI crash when selecting AI-related transcription options --- src/components/molecules/TranscriptionAccuracy.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/molecules/TranscriptionAccuracy.tsx b/src/components/molecules/TranscriptionAccuracy.tsx index 968726e..d141dc3 100644 --- a/src/components/molecules/TranscriptionAccuracy.tsx +++ b/src/components/molecules/TranscriptionAccuracy.tsx @@ -43,6 +43,10 @@ const TranscriptionAccuracy = (): JSX.Element => { return "文字起こし:高"; case "large-distil.en": return "文字起こし:英"; + case "online-transcript": + return "文字起こし:オンライン"; + case "online-chat": + return "AI:オンライン"; case "small-translate-to-en": return "翻訳(英):低"; case "medium-translate-to-en": From 8b4a497bf9428ac53acdfcf64f86a1eecd7a6e21 Mon Sep 17 00:00:00 2001 From: mohemohe Date: Sat, 6 Apr 2024 05:08:50 +0900 Subject: [PATCH 3/7] Update download URL of ggml-large.bin --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 418ebe0..599721a 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ unzip ./src-tauri/resources/vosk-model-ja-$VOSK_MODEL_VERSION.zip -d ./src-tauri rm ./src-tauri/resources/vosk-model-ja-$VOSK_MODEL_VERSION.zip # whisper -curl -LO https://huggingface.co/datasets/ggerganov/whisper.cpp/resolve/main/ggml-large.bin -mv ggml-large.bin ./src-tauri/resources +curl -LO https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v1.bin +mv ggml-large-v1.bin ./src-tauri/resources/ggml-large.bin ``` ### voskのライブラリ更新 From 77607306488922b6bf1510aec2bd1abeeb1b8843 Mon Sep 17 00:00:00 2001 From: mohemohe Date: Sat, 6 Apr 2024 06:57:53 +0900 Subject: [PATCH 4/7] Show indicator at recording button while loading recognization model --- src-tauri/src/module/record.rs | 4 ++++ src-tauri/src/module/record_desktop.rs | 3 +++ .../molecules/RecordPreparingButton.tsx | 10 ++++++++++ src/components/organisms/NoteMain.tsx | 17 ++++++++++++++++- 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/components/molecules/RecordPreparingButton.tsx diff --git a/src-tauri/src/module/record.rs b/src-tauri/src/module/record.rs index b0f434d..d690ccb 100644 --- a/src-tauri/src/module/record.rs +++ b/src-tauri/src/module/record.rs @@ -131,6 +131,10 @@ impl Record { .expect("Could not build stream"); stream.play().expect("Could not play stream"); + + let app_handle = self.app_handle.clone(); + app_handle.clone().emit_all("readyToRecognize", "").unwrap(); + let (stop_writer_tx, stop_writer_rx) = sync_channel(1); let is_converting = Arc::new(Mutex::new(false)); let (stop_convert_tx, stop_convert_rx) = unbounded(); diff --git a/src-tauri/src/module/record_desktop.rs b/src-tauri/src/module/record_desktop.rs index 094dbb3..f4b61a9 100644 --- a/src-tauri/src/module/record_desktop.rs +++ b/src-tauri/src/module/record_desktop.rs @@ -160,6 +160,9 @@ impl RecordDesktop { ); stream.start_capture().ok(); + let app_handle = self.app_handle.clone(); + app_handle.clone().emit_all("readyToRecognize", "").unwrap(); + let (stop_writer_tx, stop_writer_rx) = sync_channel(1); let is_converting = Arc::new(Mutex::new(false)); let (stop_convert_tx, stop_convert_rx) = unbounded(); diff --git a/src/components/molecules/RecordPreparingButton.tsx b/src/components/molecules/RecordPreparingButton.tsx new file mode 100644 index 0000000..a9720c2 --- /dev/null +++ b/src/components/molecules/RecordPreparingButton.tsx @@ -0,0 +1,10 @@ +const RecordPreparingButton = (): JSX.Element => { + return ( + + ) +} + +export { RecordPreparingButton } \ No newline at end of file diff --git a/src/components/organisms/NoteMain.tsx b/src/components/organisms/NoteMain.tsx index 796391d..4e415e9 100644 --- a/src/components/organisms/NoteMain.tsx +++ b/src/components/organisms/NoteMain.tsx @@ -18,6 +18,7 @@ import { TraceStartButton } from '../molecules/TraceStartButton' import { TraceStopButton } from '../molecules/TraceStopButton' import { tracingState } from '../../store/atoms/tracingState' import { tracingNoteState } from '../../store/atoms/tracingNoteState' +import { RecordPreparingButton } from '../molecules/RecordPreparingButton' const NoteMain = (): JSX.Element => { const transcriptionAccuracy = useRecoilValue(transcriptionAccuracyState) @@ -42,6 +43,7 @@ const NoteMain = (): JSX.Element => { setShowGotoBottom(true); } }, []); + const [isReadyToRecognize, setIsReadyToRecognize] = useState(false); useEffect(() => { const scrollContainer = scrollContainerRef.current; if (scrollContainer) { @@ -121,6 +123,19 @@ const NoteMain = (): JSX.Element => { } }, [recordingNote, isTracing]) + useEffect(() => { + if (isRecording) { + const unlistenReadyToRecognize = listen('readyToRecognize', () => { + setIsReadyToRecognize(true); + }); + return () => { + unlistenReadyToRecognize.then(f => f()); + } + } else { + setIsReadyToRecognize(false); + } + }, [isRecording]) + return (<>

{ }

- {(isRecording && recordingNote === selectedNote?.note_id) ? : } + {(isRecording && recordingNote === selectedNote?.note_id) ? isReadyToRecognize ? : : }
From e5dc5bfa92cb5efab74aa63cd3e0f1dc1855353e Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 8 Apr 2024 01:49:22 +0900 Subject: [PATCH 5/7] =?UTF-8?q?japanese-asr/distil-whisper-large-v3-ja-rea?= =?UTF-8?q?zonspeech-large=E3=83=A2=E3=83=87=E3=83=AB=E3=82=92=E8=A8=80?= =?UTF-8?q?=E8=AA=9E=E3=83=91=E3=83=83=E3=82=AF=EF=BC=88=E6=97=A5=E6=9C=AC?= =?UTF-8?q?=E8=AA=9E=EF=BC=9A=E9=80=9F=E5=BA=A6=E5=84=AA=E5=85=88=EF=BC=89?= =?UTF-8?q?=E3=81=A8=E3=81=97=E3=81=A6=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/migrations/001.sql | 1 + src-tauri/src/module/model_type_whisper.rs | 3 +++ src-tauri/src/module/transcriber.rs | 7 +++++-- src/components/molecules/TranscriptionAccuracy.tsx | 9 +++++++++ src/components/organisms/SettingsMain.tsx | 7 +++++++ 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src-tauri/migrations/001.sql b/src-tauri/migrations/001.sql index efdde68..ea71bb8 100644 --- a/src-tauri/migrations/001.sql +++ b/src-tauri/migrations/001.sql @@ -42,6 +42,7 @@ INSERT INTO models(model_name, model_type) VALUES("base", "whisper"); INSERT INTO models(model_name, model_type) VALUES("base.en", "whisper"); INSERT INTO models(model_name, model_type) VALUES("large", "whisper"); INSERT INTO models(model_name, model_type) VALUES("large-distil.en", "whisper"); +INSERT INTO models(model_name, model_type) VALUES("large-distil.ja", "whisper"); INSERT INTO models(model_name, model_type) VALUES("medium", "whisper"); INSERT INTO models(model_name, model_type) VALUES("medium.en", "whisper"); INSERT INTO models(model_name, model_type) VALUES("small", "whisper"); diff --git a/src-tauri/src/module/model_type_whisper.rs b/src-tauri/src/module/model_type_whisper.rs index 340a506..7c1d3ad 100644 --- a/src-tauri/src/module/model_type_whisper.rs +++ b/src-tauri/src/module/model_type_whisper.rs @@ -5,6 +5,7 @@ pub enum ModelTypeWhisper { BaseEn, Large, LargeDistilEn, + LargeDistilJa, Medium, MediumEn, Small, @@ -20,6 +21,7 @@ impl ModelTypeWhisper { ModelTypeWhisper::BaseEn => "base.en", ModelTypeWhisper::Large => "large", ModelTypeWhisper::LargeDistilEn => "large-distil.en", + ModelTypeWhisper::LargeDistilJa => "large-distil.ja", ModelTypeWhisper::Medium => "medium", ModelTypeWhisper::MediumEn => "medium.en", ModelTypeWhisper::Small => "small", @@ -39,6 +41,7 @@ impl FromStr for ModelTypeWhisper { "base.en" => Ok(ModelTypeWhisper::BaseEn), "large" => Ok(ModelTypeWhisper::Large), "large-distil.en" => Ok(ModelTypeWhisper::LargeDistilEn), + "large-distil.ja" => Ok(ModelTypeWhisper::LargeDistilJa), "medium" => Ok(ModelTypeWhisper::Medium), "medium.en" => Ok(ModelTypeWhisper::MediumEn), "small" => Ok(ModelTypeWhisper::Small), diff --git a/src-tauri/src/module/transcriber.rs b/src-tauri/src/module/transcriber.rs index 8e5e7c1..c0c11e1 100644 --- a/src-tauri/src/module/transcriber.rs +++ b/src-tauri/src/module/transcriber.rs @@ -12,8 +12,10 @@ impl Transcriber { model_type = "small"; } else if transcription_accuracy.starts_with("medium") { model_type = "medium" - } else if transcription_accuracy.starts_with("large-distil.en"){ + } else if transcription_accuracy.starts_with("large-distil.en") { model_type = "large-distil.en" + } else if transcription_accuracy.starts_with("large-distil.ja") { + model_type = "large-distil.ja" } else if transcription_accuracy.starts_with("large") { model_type = "large" } @@ -24,7 +26,8 @@ impl Transcriber { .to_string_lossy() .to_string(); - return WhisperContext::new_with_params(&model_path, WhisperContextParameters::default()).expect("failed to load whisper model"); + return WhisperContext::new_with_params(&model_path, WhisperContextParameters::default()) + .expect("failed to load whisper model"); } pub fn build_params( diff --git a/src/components/molecules/TranscriptionAccuracy.tsx b/src/components/molecules/TranscriptionAccuracy.tsx index d141dc3..e42dacc 100644 --- a/src/components/molecules/TranscriptionAccuracy.tsx +++ b/src/components/molecules/TranscriptionAccuracy.tsx @@ -43,6 +43,8 @@ const TranscriptionAccuracy = (): JSX.Element => { return "文字起こし:高"; case "large-distil.en": return "文字起こし:英"; + case "large-distil.ja": + return "文字起こし:日"; case "online-transcript": return "文字起こし:オンライン"; case "online-chat": @@ -106,6 +108,13 @@ const TranscriptionAccuracy = (): JSX.Element => { return a } } + if (c === "large-distil.ja") { + if (speakerLanguage?.startsWith("ja") || speakerLanguage?.startsWith("small-ja")) { + return [...a, c] + } else { + return a + } + } return [...a, c, `${c}-translate-to-en`] }, []).map((model, i) => (
  • diff --git a/src/components/organisms/SettingsMain.tsx b/src/components/organisms/SettingsMain.tsx index 568ec82..5fb68f7 100644 --- a/src/components/organisms/SettingsMain.tsx +++ b/src/components/organisms/SettingsMain.tsx @@ -330,6 +330,13 @@ const SettingsMain = (): JSX.Element => {
  • +
    +
    +

    言語パック(日本語:速度優先)

    + +
    + +
    From 3b276c7eab4663fee082c06f346a6bc702ea5538 Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 8 Apr 2024 01:59:26 +0900 Subject: [PATCH 6/7] =?UTF-8?q?README=E3=81=AB=E8=87=AA=E5=8B=95=E3=81=A7C?= =?UTF-8?q?ontriutor=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 5 +++++ README.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 363da97..c9cfb77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,3 +82,8 @@ jobs: releaseDraft: true prerelease: false args: --target aarch64-apple-darwin + + - name: Contribute List + uses: akhilmhdh/contributors-readme-action@v2.3.6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 599721a..e69360a 100644 --- a/README.md +++ b/README.md @@ -77,3 +77,8 @@ yarn tauri dev ``` yarn tauri build ``` + +## Contributors + + + From d748a257822ee44c1cbefb106c93ef4b7be862ee Mon Sep 17 00:00:00 2001 From: Kodai Aoyama Date: Mon, 8 Apr 2024 02:04:03 +0900 Subject: [PATCH 7/7] update to v0.9.9 --- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 524880f..b5f00b5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lycoris", "private": true, - "version": "0.9.8", + "version": "0.9.9", "type": "module", "license": "MIT", "engines": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 6063de0..e25ceb9 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2571,7 +2571,7 @@ dependencies = [ [[package]] name = "lycoris" -version = "0.9.8" +version = "0.9.9" dependencies = [ "chrono", "core-graphics 0.23.1", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index a8b175b..f4b8d30 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lycoris" -version = "0.9.8" +version = "0.9.9" description = "Lycoris is an offline voice memo" authors = ["solaoi"] license = "MIT" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 48ff038..5310c43 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Lycoris", - "version": "0.9.8" + "version": "0.9.9" }, "tauri": { "allowlist": {