Skip to content

Commit

Permalink
Merge pull request #90 from solaoi/main
Browse files Browse the repository at this point in the history
update to v0.9.6
  • Loading branch information
solaoi authored Nov 27, 2023
2 parents cdf74bd + 09b3b60 commit 9097c2c
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lycoris",
"private": true,
"version": "0.9.5",
"version": "0.9.6",
"type": "module",
"license": "MIT",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lycoris"
version = "0.9.5"
version = "0.9.6"
description = "Lycoris is an offline voice memo"
authors = ["solaoi"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/migrations/001.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ CREATE TABLE models (
);
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-v1", "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("medium", "whisper");
INSERT INTO models(model_name, model_type) VALUES("medium.en", "whisper");
INSERT INTO models(model_name, model_type) VALUES("small", "whisper");
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/module/model_type_whisper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::str::FromStr;
pub enum ModelTypeWhisper {
Base,
BaseEn,
LargeV1,
Large,
LargeDistilEn,
Medium,
MediumEn,
Small,
Expand All @@ -18,8 +18,8 @@ impl ModelTypeWhisper {
match self {
ModelTypeWhisper::Base => "base",
ModelTypeWhisper::BaseEn => "base.en",
ModelTypeWhisper::LargeV1 => "large-v1",
ModelTypeWhisper::Large => "large",
ModelTypeWhisper::LargeDistilEn => "large-distil.en",
ModelTypeWhisper::Medium => "medium",
ModelTypeWhisper::MediumEn => "medium.en",
ModelTypeWhisper::Small => "small",
Expand All @@ -37,8 +37,8 @@ impl FromStr for ModelTypeWhisper {
match input {
"base" => Ok(ModelTypeWhisper::Base),
"base.en" => Ok(ModelTypeWhisper::BaseEn),
"large-v1" => Ok(ModelTypeWhisper::LargeV1),
"large" => Ok(ModelTypeWhisper::Large),
"large-distil.en" => Ok(ModelTypeWhisper::LargeDistilEn),
"medium" => Ok(ModelTypeWhisper::Medium),
"medium.en" => Ok(ModelTypeWhisper::MediumEn),
"small" => Ok(ModelTypeWhisper::Small),
Expand Down
2 changes: 2 additions & 0 deletions src-tauri/src/module/transcriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ impl Transcriber {
model_type = "small";
} else if transcription_accuracy.starts_with("medium") {
model_type = "medium"
} else if transcription_accuracy.starts_with("large-distil.en"){
model_type = "large-distil.en"
} else if transcription_accuracy.starts_with("large") {
model_type = "large"
}
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "Lycoris",
"version": "0.9.5"
"version": "0.9.6"
},
"tauri": {
"allowlist": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/molecules/SettingModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRecoilState } from 'recoil';
import { settingKeyState } from "../../store/atoms/settingKeyState";

const SettingModel = (): JSX.Element => {
const settingModels = ["gpt-3.5-turbo", "gpt-4"]
const settingModels = ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "gpt-4-1106-preview"]
const [settingKey, setSettingKey] = useRecoilState(settingKeyState("settingModel"))

const change = (e: ChangeEvent<HTMLSelectElement>) => {
Expand Down
11 changes: 10 additions & 1 deletion src/components/molecules/TranscriptionAccuracy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ const TranscriptionAccuracy = (): JSX.Element => {
return "文字起こし:中";
case "large":
return "文字起こし:高";
case "large-distil.en":
return "文字起こし:英";
case "small-translate-to-en":
return "翻訳(英):低";
case "medium-translate-to-en":
return "翻訳(英):中";
case "large-translate-to-en":
return "翻訳(英):高";
default:
throw new Error("unknown modelType");
throw new Error("unknown modelType: " + model);
}
}

Expand All @@ -45,6 +47,13 @@ const TranscriptionAccuracy = (): JSX.Element => {
if (speakerLanguage?.startsWith("en-us") || speakerLanguage?.startsWith("small-en-us")) {
return [...a, c]
}
if (c === "large-distil.en") {
if (speakerLanguage?.startsWith("en-us") || speakerLanguage?.startsWith("small-en-us")) {
return [...a, c]
} else {
return a
}
}
return [...a, c, `${c}-translate-to-en`]
}, []).map((model, i) => (
<option key={"transcription-accuracy" + i} value={model} selected={model === transcriptionAccuracy}>{mapModel(model)}</option>
Expand Down
15 changes: 11 additions & 4 deletions src/components/organisms/SettingsMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,29 +300,36 @@ const SettingsMain = (): JSX.Element => {
<div className="px-5 mt-2">
<div className="mb-5">
<p>通常の文字起こしを追いかける形で、高精度で文字起こしや翻訳を行います。</p>
<p>下記言語パックをダウンロードするか、オンライン設定を行ってください。</p>
<p>下記精度に応じた言語パックをダウンロードするか、オンライン設定を行ってください。</p>
</div>
<div style={{ height: "86px" }}>
<div className="flex items-center justify-between mb-2">
<p>言語パック(精度:低)</p>
<p>言語パック(汎用:低)</p>
<ModelDownloadWhisperButton modelType="small" />
</div>
<ModelDownloadWhisperProgress modelType="small" />
</div>
<div style={{ height: "86px" }}>
<div className="flex items-center justify-between mb-2">
<p>言語パック(精度:中)</p>
<p>言語パック(汎用:中)</p>
<ModelDownloadWhisperButton modelType="medium" />
</div>
<ModelDownloadWhisperProgress modelType="medium" />
</div>
<div style={{ height: "86px" }}>
<div className="flex items-center justify-between mb-2">
<p>言語パック(精度:高)</p>
<p>言語パック(汎用:高)</p>
<ModelDownloadWhisperButton modelType="large" />
</div>
<ModelDownloadWhisperProgress modelType="large" />
</div>
<div style={{ height: "86px" }}>
<div className="flex items-center justify-between mb-2">
<p>言語パック(英語:高)</p>
<ModelDownloadWhisperButton modelType="large-distil.en" />
</div>
<ModelDownloadWhisperProgress modelType="large-distil.en" />
</div>
</div>
</div>
<div className="px-5">
Expand Down

0 comments on commit 9097c2c

Please sign in to comment.