Skip to content

Commit eadb20f

Browse files
committed
Merge branch 'main' of https://github.com/fastrepl/hyprnote into redemption-settings-hotfix
2 parents b097cc1 + 45ec9eb commit eadb20f

File tree

18 files changed

+376
-60
lines changed

18 files changed

+376
-60
lines changed

.github/actions/rust_install/action.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
inputs:
2-
target:
2+
platform:
33
required: false
44
type: string
55

@@ -8,23 +8,23 @@ runs:
88
steps:
99
- run: rustup toolchain install 1.88.0 --profile minimal --no-self-update
1010
shell: bash
11-
- if: inputs.target == 'macos'
11+
- if: inputs.platform == 'macos'
1212
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
1313
shell: bash
14-
- if: inputs.target == 'ios'
14+
- if: inputs.platform == 'ios'
1515
run: rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
1616
shell: bash
17-
- if: inputs.target == 'android'
17+
- if: inputs.platform == 'android'
1818
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
1919
shell: bash
20-
- if: inputs.target == 'windows'
20+
- if: inputs.platform == 'windows'
2121
run: |
2222
rustup target add x86_64-pc-windows-msvc
2323
# https://tauri.app/distribute/sign/windows/#install-trusted-signing-cli
2424
cargo install trusted-signing-cli
2525
shell: bash
26-
- if: contains(inputs.target, 'linux-gnu') || contains(inputs.target, 'linux-musl')
27-
run: rustup target add ${{ inputs.target }}
26+
- if: inputs.platform == 'linux'
27+
run: rustup target add linux-gnu linux-musl
2828
shell: bash
2929
- uses: Swatinem/rust-cache@v2
3030
with:

.github/workflows/owhisper_cd.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# https://docs.crabnebula.dev/cloud/ci/tauri-v2-workflow/
21
on:
32
workflow_dispatch:
43
release:
@@ -41,11 +40,7 @@ jobs:
4140
if [[ "${{ matrix.target }}" == *"musl"* ]]; then
4241
sudo apt-get install -y musl-tools musl-dev
4342
fi
44-
- run: |
45-
VERSION=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "owhisper") | .version')
46-
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
4743
- uses: ./.github/actions/rust_install
4844
with:
49-
target: ${{ matrix.target }}
50-
- name: Build binary
51-
run: cargo build --release --bin owhisper --target ${{ matrix.target }}
45+
platform: ${{ matrix.platform }}
46+
- run: cargo build --release --bin owhisper-cli --target ${{ matrix.target }}

Cargo.lock

Lines changed: 67 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ members = [
1313
"apps/app/server",
1414
"apps/desktop/src-tauri",
1515
"crates/*",
16-
"owhisper",
16+
"owhisper/*",
1717
"plugins/*",
1818
]
1919

dprint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"**/permissions/**",
3434
"**/*.swift",
3535
"**/migrations/**",
36-
"**/charts/**"
36+
"**/charts/**",
37+
"**/schema.json"
3738
],
3839
"exec": {
3940
"cwd": "${configDir}",

owhisper/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# OWhisper
22

33
> Something like Ollama, but for speech-to-text.
4+
5+
## Usage
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
[package]
2-
name = "owhisper"
2+
name = "owhisper-cli"
33
version = "0.0.1"
44
edition = "2024"
55

6+
[build-dependencies]
7+
owhisper-config = { path = "../owhisper-config" }
8+
schemars = { workspace = true }
9+
serde_json = { workspace = true }
10+
611
[dependencies]
12+
owhisper-config = { path = "../owhisper-config" }
13+
714
hypr-transcribe-aws = { workspace = true }
815
hypr-transcribe-azure = { workspace = true }
916
hypr-transcribe-gcp = { workspace = true }
17+
hypr-transcribe-whisper-local = { workspace = true }
1018

1119
axum = { workspace = true }
12-
serde = { workspace = true }
1320
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
1421
tower = { workspace = true }
1522
tracing = { workspace = true }
1623

1724
clap = { version = "4", features = ["derive", "env"] }
1825
colored = "3.0.0"
19-
config = "0.15.13"
2026
indicatif = "0.18.0"
2127

2228
anyhow = { workspace = true }
29+
clap_autocomplete = "0.4.2"
2330
open = "5.3.2"
2431
rubato = "0.16.2"
32+
schemars = { workspace = true }
File renamed without changes.

owhisper/owhisper-cli/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
fn main() {
2+
let schema = schemars::schema_for!(owhisper_config::Config);
3+
let out_content = serde_json::to_string_pretty(&schema).unwrap();
4+
let out_path = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../schema.json");
5+
std::fs::write(out_path, out_content).unwrap();
6+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
mod pull;
12
mod readme;
23
mod serve;
34

5+
pub use pull::*;
46
pub use readme::*;
57
pub use serve::*;

0 commit comments

Comments
 (0)