Skip to content

Commit

Permalink
MVP of a TTS + AI speech system w/ OBS
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbegin committed Dec 24, 2022
1 parent 8c3775c commit 216f322
Show file tree
Hide file tree
Showing 28 changed files with 2,564 additions and 622 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -4,6 +4,10 @@ debug/
target/
MP3s/
Banned/
Silence/
data/
obs_data/
TwitchChatTTSRecordings/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Expand All @@ -20,3 +24,4 @@ subd.db-shm
subd.db-wal
subd.*.db
.env
test.wav
2 changes: 2 additions & 0 deletions Cargo.toml
Expand Up @@ -31,6 +31,8 @@ tungstenite.workspace = true
tokio-tungstenite.workspace = true
uuid.workspace = true

chrono = "*"
rgb = "0.8"
axum = "0.5.4"
futures = "0.3.21"
obws = "0.10"
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -12,7 +12,8 @@ begin:
resetdb:
sqlx db drop -y
sqlx db create
sqlx migrate run --source crates/subd-db/migrations
sqlx migrate run --source migrations
# sqlx migrate run --source crates/subd-db/migrations

serve:
cd crates/subd-yew && trunk serve --address 0.0.0.0
Expand Down
191 changes: 191 additions & 0 deletions OBS.md
@@ -0,0 +1,191 @@
# OBS

## Move Value Filters

This is for Move Value Type: "Settings"

```
"settings": {
"duration": 7000,
"filter": "Blur",
"move_value_type": 0,
"setting_float": 0.0,
"setting_float_max": 0.0,
"setting_float_min": 0.0,
"setting_name": "",
"value_type": 0
},
```

This is for an Experimental Blur

This is while it's on "Settings"
"move_value_type": 1

Notice: It just adds the field and amount to the JSON
in this case "Filter.Blur.Size": 100.0

```json
{
"Filter.Blur.Size": 100.0,
"custom_duration": true,
"duration": 6969,
"filter": "Blur",
"move_value_type": 1,
"value_type": 0
}
```

Now trying for Single Setting
"move_value_type": 0,
So 0 corresponds to single-setting in this case
Also note, it now has 3 values:
-> Min and max for float
-> and the actual value

-> As well as the setting_name

The min and max are for the random I'm pretty sure

```json
{
"Filter.Blur.Size": 100.0,
"custom_duration": true,
"duration": 6968,
"filter": "Blur",
"move_value_type": 0,
"setting_float": 51.0,
"setting_float_max": 100.0,
"setting_float_min": 100.0,
"setting_name": "Filter.Blur.Size",
"value_type": 2
}
```

## Random

"move_value_type": 2
this is for random

```json
{
"Filter.Blur.Size": 100.0,
"custom_duration": true,
"duration": 511,
"filter": "Blur",
"move_value_type": 4,
"setting_float": -10.0,
"setting_float_max": -10.0,
"setting_float_min": -10.0,
"setting_name": "Filter.Blur.Size",
"value_type": 2
},
```
## Add

"move_value_type": 3,
So this is for Add

WHAT IS VALUE TYPE HERE???
"value_type": 2
It's a negative number does that do anything?
float???
```json
{
"Filter.Blur.Size": 100.0,
"custom_duration": true,
"duration": 511,
"filter": "Blur",
"move_value_type": 3,
"setting_float": -10.0,
"setting_float_max": 100.0,
"setting_float_min": 1.0,
"setting_name": "Filter.Blur.Size",
"value_type": 2
},
```

---

## Simplified Move Value Settings

## Base Settings

```json
{
"move_value_type": 0,
"setting_float": 50.0,
"setting_name": "Filter.Blur.Size",
"value_type": 0
},
```

## Single Setting

```json
{
"move_value_type": 0,
"setting_float": 50.0,
"setting_name": "Filter.Blur.Size",
"value_type": 0
},
```

## Multiple Settings

```json
{
"move_value_type": 1,
"Filter.Blur.Size": 100.0,
"value_type": 0
}
```

## Random

I feel like this add
```json
{
"move_value_type": 2,
"filter": "3D Transform",
"setting_float_max": 90.0,
"setting_float_min": 9.0,
"setting_name": "Camera.FieldOfView",
"value_type": 2
}
```

## Add

```json
{
"move_value_type": 3,
"setting_float": -10.0,
"setting_name": "Filter.Blur.Size",
"value_type": 2
}
```

## Typing

We need to explore this a little more


```json
{
"easing_match": 0,
"setting_decimals": 1,

"setting_float": 1.0,
"setting_float_max": 0.0,
"setting_float_min": 0.0,
"setting_int": 0,
"setting_int_max": 0,
"setting_int_min": 0,

"move_value_type": 4,
"setting_name": "text",
"setting_text": "Ok NOW",
"value_type": 4
}
```
46 changes: 39 additions & 7 deletions README.md
Expand Up @@ -63,12 +63,21 @@ Scroll Settings:
// This is examples of stopping the scroll
!scroll begin x 0
!scroll begin y 0
!scroll primetime x 500
```

### !blur & !unblur

Blur or Unblur the source passed in.

!blur primetime 100

!move snoop 500 500

!scale snoop 200 200


```
!blur SOURCE AMOUNT DURATION_TO_REACH_BLUR_AMOUNT
```
Expand Down Expand Up @@ -269,6 +278,15 @@ Change to the Scene where you can read code.
## Corner Pin

```
!corner frog Corners.BottomLeft.X 100
!corner frog Corners.BottomLeft.Y 10
!corner frog Corners.BottomRight.X 10
!corner frog Corners.BottomRight.Y 10
!corner frog Corners.TopLeft.X 10
!corner frog Corners.TopLeft.Y 10
!corner frog Corners.TopRight.X 10
!corner frog Corners.TopRight.Y 10
!corner frog Corners.BottomLeft.X 100
!corner frog Corners.BottomLeft.Y 10
!corner frog Corners.BottomRight.X 10
Expand All @@ -282,12 +300,15 @@ Change to the Scene where you can read code.
# Orthographic

```
!ortho frog Scale.Y 100
!ortho frog Shear.X 100
!ortho frog Shear.Y 100
!def_ortho frog
!ortho frog Scale.Y 1000
!ortho frog Shear.X 1000
!ortho frog Shear.Y 1000
!ortho frog Position.X -300
!ortho frog Position.Y 10
!ortho frog Rotation.X 360
!ortho frog Position.X 0 3000
!ortho frog Position.Y 0
!ortho frog Rotation.X 36000
!ortho frog Rotation.Y 360
!ortho frog Rotation.Z 3600
```
Expand All @@ -296,8 +317,8 @@ Change to the Scene where you can read code.

```
!perp frog Camera.FieldOfView 1000
!perp frog Scale.X 100
!perp frog Scale.Y 1000
!perp frog Scale.X 200
!perp frog Scale.Y 200
!perp frog Shear.X 10
!perp frog Shear.Y 10
!perp frog Position.X 220
Expand All @@ -306,4 +327,15 @@ Change to the Scene where you can read code.
!perp frog Rotation.X 360
!perp frog Rotation.Y 360
!perp frog Rotation.Z 360
```

---

## Returning to Normal

- Right now Begin has Super+H to return as much as possible to normal

### Questions

- How does scroll stop???
Binary file added Silence/birthday.mp3
Binary file not shown.
Binary file added Silence/drop.mp3
Binary file not shown.
Binary file added Silence/jesus.mp3
Binary file not shown.
45 changes: 45 additions & 0 deletions Warmup.md
@@ -0,0 +1,45 @@
# Warmup

This is meant to a series of commands to test
if the system is working.

## Testing Sounds

```twitchchat
hello
linux arch alphine
```

## Testing OBS Effects

```
!memes
!work
!scroll begin speed_x 500 10000
```

#### Working on

We have to wait extra long or something
2 in a row is working???

```
!blur begin 100
!blur begin 0
!blur shark 100
!blur shark
!blur begin 0
!unblur begin
!move snoop 500 500
!scale snoop 200 2000
```
7 changes: 2 additions & 5 deletions crates/subd-db/src/lib.rs
Expand Up @@ -160,9 +160,7 @@ pub async fn get_db_pool() -> sqlx::PgPool {
// let new_id = sqlx::query!(
// r#"INSERT INTO users (twitch_id) VALUES (?)"#,
// twitch_user_id
// )
// .execute(&mut *conn)
// .await?
// ) .execute(&mut *conn) .await?
// .last_insert_rowid();
//
// Ok(new_id)
Expand Down Expand Up @@ -361,8 +359,7 @@ pub async fn get_db_pool() -> sqlx::PgPool {
// {
// Some(row) => UserRoles {
// roles: {
// let mut h = HashSet::new();
// if row.is_github_sponsor {
// let mut h = HashSet::new(); if row.is_github_sponsor {
// h.insert(Role::GithubSponsor {
// tier: "UNKNOWN".to_string(),
// });
Expand Down

0 comments on commit 216f322

Please sign in to comment.