Compare commits
No commits in common. "master" and "v0.4.0" have entirely different histories.
27
.drone.yml
27
.drone.yml
|
@ -1,27 +0,0 @@
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: default
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: test
|
|
||||||
image: rust
|
|
||||||
commands:
|
|
||||||
- rustup component add clippy rustfmt
|
|
||||||
- apt-get update -qq
|
|
||||||
- apt-get install -qqy llvm-dev libclang-dev clang libspeechd-dev
|
|
||||||
- cargo fmt --all --check
|
|
||||||
- cargo test --no-default-features --features 0_10
|
|
||||||
- cargo clippy --no-default-features --features 0_10
|
|
||||||
- name: release
|
|
||||||
image: rust
|
|
||||||
commands:
|
|
||||||
- apt-get update -qq
|
|
||||||
- apt-get install -qqy llvm-dev libclang-dev clang libspeechd-dev
|
|
||||||
- cargo publish --no-default-features --features 0_10 --manifest-path speech-dispatcher-sys/Cargo.toml || true
|
|
||||||
- cargo publish --no-default-features --features 0_10 --manifest-path speech-dispatcher/Cargo.toml
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/tags/v*
|
|
||||||
environment:
|
|
||||||
CARGO_REGISTRY_TOKEN:
|
|
||||||
from_secret: cargo_registry_token
|
|
26
.gitlab-ci.yml
Normal file
26
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
image: rust
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- test
|
||||||
|
- publish
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install -y libclang-3.9-dev libspeechd-dev
|
||||||
|
- export CPATH=/usr/lib/llvm-3.9/lib/clang/3.9.1/include/
|
||||||
|
|
||||||
|
test:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- cargo test
|
||||||
|
|
||||||
|
publish:
|
||||||
|
stage: publish
|
||||||
|
script:
|
||||||
|
- cargo login $CARGO_TOKEN
|
||||||
|
- cargo package --manifest-path speech-dispatcher-sys/Cargo.toml
|
||||||
|
- cargo publish --manifest-path speech-dispatcher-sys/Cargo.toml
|
||||||
|
- cargo package --manifest-path speech-dispatcher/Cargo.toml
|
||||||
|
- cargo publish --manifest-path speech-dispatcher/Cargo.toml
|
||||||
|
only:
|
||||||
|
- tags
|
60
cliff.toml
60
cliff.toml
|
@ -1,60 +0,0 @@
|
||||||
# configuration file for git-cliff (0.1.0)
|
|
||||||
|
|
||||||
[changelog]
|
|
||||||
# changelog header
|
|
||||||
header = """
|
|
||||||
# Changelog\n
|
|
||||||
All notable changes to this project will be documented in this file.\n
|
|
||||||
"""
|
|
||||||
# template for the changelog body
|
|
||||||
# https://tera.netlify.app/docs/#introduction
|
|
||||||
body = """
|
|
||||||
{% if version %}\
|
|
||||||
## Version {{ version | trim_start_matches(pat="v") }} - {{ timestamp | date(format="%Y-%m-%d") }}
|
|
||||||
{% else %}\
|
|
||||||
## Unreleased
|
|
||||||
{% endif %}\
|
|
||||||
{% for group, commits in commits | group_by(attribute="group") %}
|
|
||||||
### {{ group | upper_first }}
|
|
||||||
{% for commit in commits %}
|
|
||||||
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
|
|
||||||
{% endfor %}
|
|
||||||
{% endfor %}\n
|
|
||||||
"""
|
|
||||||
# remove the leading and trailing whitespace from the template
|
|
||||||
trim = true
|
|
||||||
# changelog footer
|
|
||||||
footer = """
|
|
||||||
<!-- generated by git-cliff -->
|
|
||||||
"""
|
|
||||||
|
|
||||||
[git]
|
|
||||||
# parse the commits based on https://www.conventionalcommits.org
|
|
||||||
conventional_commits = true
|
|
||||||
# filter out the commits that are not conventional
|
|
||||||
filter_unconventional = true
|
|
||||||
# regex for parsing and grouping commits
|
|
||||||
commit_parsers = [
|
|
||||||
{ message = "^feat", group = "Features"},
|
|
||||||
{ message = "^fix", group = "Bug Fixes"},
|
|
||||||
{ message = "^doc", group = "Documentation"},
|
|
||||||
{ message = "^perf", group = "Performance"},
|
|
||||||
{ message = "^refactor", group = "Refactor"},
|
|
||||||
{ message = "^style", group = "Styling"},
|
|
||||||
{ message = "^test", group = "Testing"},
|
|
||||||
{ message = "^chore\\(release\\): prepare for", skip = true},
|
|
||||||
{ message = "^chore", group = "Miscellaneous Tasks"},
|
|
||||||
{ body = ".*security", group = "Security"},
|
|
||||||
]
|
|
||||||
# filter out the commits that are not matched by commit parsers
|
|
||||||
filter_commits = false
|
|
||||||
# glob pattern for matching git tags
|
|
||||||
tag_pattern = "v[0-9]*"
|
|
||||||
# regex for skipping tags
|
|
||||||
skip_tags = ""
|
|
||||||
# regex for ignoring tags
|
|
||||||
ignore_tags = ""
|
|
||||||
# sort the tags chronologically
|
|
||||||
date_order = false
|
|
||||||
# sort the commits inside sections by oldest/newest order
|
|
||||||
sort_commits = "oldest"
|
|
|
@ -1,17 +1,11 @@
|
||||||
[package]
|
[package]
|
||||||
name = "speech-dispatcher-sys"
|
name = "speech-dispatcher-sys"
|
||||||
version = "0.7.0"
|
version = "0.4.0"
|
||||||
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
|
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
|
||||||
repository = "https://dev.thewordnerd.info/nolan/speech-dispatcher-rs"
|
repository = "https://gitlab.com/ndarilek/speech-dispatcher-sys"
|
||||||
description = "speech-dispatcher system bindings"
|
description = "speech-dispatcher system bindings"
|
||||||
license = "LGPL-2.1 OR MIT OR Apache-2.0"
|
license = "LGPL-2.1"
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
bindgen = ">= 0.54"
|
bindgen = "0.51"
|
||||||
|
gcc = "0.3"
|
||||||
[package.metadata.release]
|
|
||||||
tag-prefix = ""
|
|
||||||
publish = false
|
|
||||||
push = false
|
|
||||||
pre-release-hook = ["git-cliff", "-o", "CHANGELOG.md", "--tag", "{{version}}"]
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ fn main() {
|
||||||
.constified_enum_module("SPDSpelling")
|
.constified_enum_module("SPDSpelling")
|
||||||
.use_core()
|
.use_core()
|
||||||
.layout_tests(false)
|
.layout_tests(false)
|
||||||
.generate()
|
.generate().unwrap()
|
||||||
.unwrap()
|
|
||||||
.write_to_file(Path::new(&out_dir).join("speech_dispatcher_sys.rs"));
|
.write_to_file(Path::new(&out_dir).join("speech_dispatcher_sys.rs"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
name = "speech-dispatcher"
|
name = "speech-dispatcher"
|
||||||
version = "0.16.0"
|
version = "0.4.0"
|
||||||
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
|
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
|
||||||
repository = "https://dev.thewordnerd.info/nolan/speech-dispatcher-rs"
|
repository = "https://gitlab.com/ndarilek/speech-dispatcher-rs"
|
||||||
description = "Rusty interface to the speech-dispatcher speech synthesis library"
|
description = "Rusty interface to the speech-dispatcher speech synthesis library"
|
||||||
license = "LGPL-2.1 OR MIT OR Apache-2.0"
|
license = "LGPL-2.1"
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
[features]
|
|
||||||
0_11 = ["0_10"]
|
|
||||||
0_10 = []
|
|
||||||
0_9 = []
|
|
||||||
default = ["0_11"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
lazy_static = "1"
|
speech-dispatcher-sys = { version = "0.4.0", path = "../speech-dispatcher-sys" }
|
||||||
speech-dispatcher-sys = { version = "0.7", path = "../speech-dispatcher-sys" }
|
|
||||||
libc = "0.2.125"
|
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
|
||||||
no-default-features = true
|
|
||||||
features = ["0_9"]
|
|
||||||
|
|
||||||
[package.metadata.release]
|
|
||||||
tag-prefix = ""
|
|
||||||
publish = false
|
|
||||||
push = false
|
|
||||||
pre-release-hook = ["git-cliff", "-o", "CHANGELOG.md", "--tag", "{{version}}"]
|
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
use speech_dispatcher::*;
|
|
||||||
use std::io;
|
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
||||||
let connection = speech_dispatcher::Connection::open(
|
|
||||||
"hello_world",
|
|
||||||
"hello_world",
|
|
||||||
"hello_world",
|
|
||||||
Mode::Threaded,
|
|
||||||
)?;
|
|
||||||
connection.on_begin(Some(Box::new(|msg_id, client_id| {
|
|
||||||
println!("Beginning {} from {}", msg_id, client_id)
|
|
||||||
})));
|
|
||||||
connection.on_end(Some(Box::new(|msg_id, client_id| {
|
|
||||||
println!("Ending {} from {}", msg_id, client_id)
|
|
||||||
})));
|
|
||||||
let connection_clone = connection.clone();
|
|
||||||
drop(connection);
|
|
||||||
connection_clone.say(
|
|
||||||
Priority::Important,
|
|
||||||
format!(
|
|
||||||
"Hello, world at rate {} from client {}.",
|
|
||||||
connection_clone.get_voice_rate(),
|
|
||||||
connection_clone.client_id()
|
|
||||||
),
|
|
||||||
);
|
|
||||||
connection_clone.set_voice_rate(100)?;
|
|
||||||
connection_clone.say(Priority::Important, "This is faster.");
|
|
||||||
connection_clone.set_voice_rate(0)?;
|
|
||||||
connection_clone.set_spelling(true)?;
|
|
||||||
connection_clone.say(Priority::Important, "This is spelled.");
|
|
||||||
connection_clone.set_spelling(false)?;
|
|
||||||
connection_clone.set_punctuation(Punctuation::All)?;
|
|
||||||
connection_clone.say(
|
|
||||||
Priority::Important,
|
|
||||||
"This statement, unlike others, has punctuation that is spoken!",
|
|
||||||
);
|
|
||||||
connection_clone.set_punctuation(Punctuation::None)?;
|
|
||||||
let mut _input = String::new();
|
|
||||||
io::stdin().read_line(&mut _input).unwrap();
|
|
||||||
Ok(())
|
|
||||||
}
|
|
|
@ -1,40 +1,17 @@
|
||||||
use speech_dispatcher::*;
|
extern crate speech_dispatcher;
|
||||||
use std::io;
|
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
use speech_dispatcher::*;
|
||||||
let connection = speech_dispatcher::Connection::open(
|
|
||||||
"hello_world",
|
fn main() {
|
||||||
"hello_world",
|
let connection = speech_dispatcher::Connection::open("hello_world", "hello_world", "hello_world", Mode::Single);
|
||||||
"hello_world",
|
connection.say(Priority::Important, format!("Hello, world at rate {}.", connection.get_voice_rate()));
|
||||||
Mode::Threaded,
|
connection.set_voice_rate(100);
|
||||||
)?;
|
|
||||||
connection.on_begin(Some(Box::new(|msg_id, client_id| {
|
|
||||||
println!("Beginning {} from {}", msg_id, client_id)
|
|
||||||
})));
|
|
||||||
connection.on_end(Some(Box::new(|msg_id, client_id| {
|
|
||||||
println!("Ending {} from {}", msg_id, client_id)
|
|
||||||
})));
|
|
||||||
connection.say(
|
|
||||||
Priority::Important,
|
|
||||||
format!(
|
|
||||||
"Hello, world at rate {} from client {}.",
|
|
||||||
connection.get_voice_rate(),
|
|
||||||
connection.client_id()
|
|
||||||
),
|
|
||||||
);
|
|
||||||
connection.set_voice_rate(100)?;
|
|
||||||
connection.say(Priority::Important, "This is faster.");
|
connection.say(Priority::Important, "This is faster.");
|
||||||
connection.set_voice_rate(0)?;
|
connection.set_voice_rate(0);
|
||||||
connection.set_spelling(true)?;
|
connection.set_spelling(true);
|
||||||
connection.say(Priority::Important, "This is spelled.");
|
connection.say(Priority::Important, "This is spelled.");
|
||||||
connection.set_spelling(false)?;
|
connection.set_spelling(false);
|
||||||
connection.set_punctuation(Punctuation::All)?;
|
connection.set_punctuation(Punctuation::All);
|
||||||
connection.say(
|
connection.say(Priority::Important, "This statement, unlike others, has punctuation that is spoken!");
|
||||||
Priority::Important,
|
connection.set_punctuation(Punctuation::None);
|
||||||
"This statement, unlike others, has punctuation that is spoken!",
|
|
||||||
);
|
|
||||||
connection.set_punctuation(Punctuation::None)?;
|
|
||||||
let mut _input = String::new();
|
|
||||||
io::stdin().read_line(&mut _input).unwrap();
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
use speech_dispatcher::*;
|
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
||||||
let connection = Connection::open("list_voices", "list_voices", "list_voices", Mode::Threaded)?;
|
|
||||||
|
|
||||||
let modules = connection.list_output_modules()?;
|
|
||||||
println!("Modules available: {:?}", modules);
|
|
||||||
for module in modules {
|
|
||||||
if connection.set_output_module(&module).is_ok() {
|
|
||||||
println!("Listing voices for module {module}");
|
|
||||||
} else {
|
|
||||||
println!("Failed to set output module to {module}");
|
|
||||||
continue;
|
|
||||||
};
|
|
||||||
let voices = connection.list_synthesis_voices()?;
|
|
||||||
for voice in voices {
|
|
||||||
if let Some(variant) = voice.variant {
|
|
||||||
println!(
|
|
||||||
" Name: {} / Language: {} / Variant: {variant}",
|
|
||||||
voice.name, voice.language
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
println!(" Name: {} / Language: {}", voice.name, voice.language);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Use connection.set_synthesis_voice(voice) to set the voice to use.
|
|
||||||
Ok(())
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user