diff options
-rwxr-xr-x | get_sd_image.sh | 27 | ||||
-rw-r--r-- | index.html | 48 | ||||
-rw-r--r-- | nessi_avatar.jpg | bin | 0 -> 13396 bytes | |||
-rw-r--r-- | nessi_generated.jpg | bin | 0 -> 348863 bytes | |||
-rwxr-xr-x | replace_phrase.sh | 17 | ||||
-rw-r--r-- | todays_audio.opus | bin | 0 -> 67235 bytes | |||
-rw-r--r-- | todays_audio.opus.json | 1 | ||||
-rw-r--r-- | todays_audio.opus.srt | 4 | ||||
-rw-r--r-- | todays_audio.opus.tsv | 2 | ||||
-rw-r--r-- | todays_audio.opus.txt | 1 | ||||
-rw-r--r-- | todays_audio.opus.vtt | 5 | ||||
-rwxr-xr-x | update_index.sh | 18 |
12 files changed, 123 insertions, 0 deletions
diff --git a/get_sd_image.sh b/get_sd_image.sh new file mode 100755 index 0000000..4d9d875 --- /dev/null +++ b/get_sd_image.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +prompt=${1:-} +steps=${2:-25} + +commonNegative="(((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquidtongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missingbreasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fusedears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, old photo, low res, black and white, black and white filter, colorless, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquid tongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, old photo, low res, black and white, black and white filter, colorless, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquid tongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missing breasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fused ears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, (((deformed))), blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar, multiple breasts, (mutated hands and fingers:1.5), (long body :1.3), (mutation, poorly drawn :1.2), black-white, bad anatomy, liquid body, liquidtongue, disfigured, malformed, mutated, anatomical nonsense, text font ui, error, malformed hands, long neck, blurred, lowers, low res, bad anatomy, bad proportions, bad shadow, uncoordinated body, unnatural body, fused breasts, bad breasts, huge breasts, poorly drawn breasts, extra breasts, liquid breasts, heavy breasts, missingbreasts, huge haunch, huge thighs, huge calf, bad hands, fused hand, missing hand, disappearing arms, disappearing thigh, disappearing calf, disappearing legs, fusedears, bad ears, poorly drawn ears, extra ears, liquid ears, heavy ears, missing ears, authors signature, writing, emoji" + +# model="DPM++ 2M Karras" +model="DPM++ 2M Karras" + +imgPath=./nessi_avatar.jpg +sourceIMG=$(base64 -w 0 "$imgPath") +sourceIMG=$"\"$sourceIMG\"" + +resp=$(curl --data "{\"init_images\": ["$sourceIMG"], \"steps\":\"$steps\", \"prompt\":\"$prompt\", \"sampler_index\":\"$model\", \"sampler_name\":\"$model\", \"negative_prompt\": \"$commonNegative\", \"denoising_strength\": 0.55, \"cfg_scale\": 23}" --header 'Content-Type: application/json' http://127.0.0.1:7860/sdapi/v1/img2img) + +# curl --data '{"steps":25, "prompt":"confused chess player", "sampler_index":"DPM++ 2M Karras", "sampler_name":"DPM++ 2M Karras"}' --header 'Content-Type: application/json' http://127.0.0.1:7860/sdapi/v1/txt2img > temp.json +# echo $resp > temp.json + +# outname=$(printf "$prompt$steps" | xxhsum | cut -d " " -f 1) +outname="nessi_generated" +outname="$outname.jpg" + +echo $resp | jq -r '.images[]' | base64 -d > $outname +# jq -r '.images[]' temp.json | base64 -d > $outname diff --git a/index.html b/index.html new file mode 100644 index 0000000..1c09e88 --- /dev/null +++ b/index.html @@ -0,0 +1,48 @@ +<!doctype html> + +<head> + <title>Index page</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="style.css"> + <script async src="https://ackee.grailfinder.net/tracker.js" data-ackee-server="https://ackee.grailfinder.net" data-ackee-domain-id="49bb31db-aeb0-47b0-9964-4c9650306394"></script> +</head> + +<body> +<div id="content"> + <h2>Todays phrase</h2> + <p id=phrase>Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus. </p> + <img src=nessi_generated.jpg alt="some nessi generated image" width=250 height=250></img> + <p> + todays_audio.opus <br /> + <audio controls> + <source src="./todays_audio.opus" type="audio/ogg"> + Your browser does not support the audio element. + </audio> + </p> + + + <h2>Site introduction:</h2> + <p>stories about encountering problems and solving them</p> + + <div> + <h2>Text manipulation</h2> + <ul> + <li><a href="text_manipulation/extraction/reasoning.html">Text extraction (from german videoaudiobook "Overlord")</a></li> + </ul> + <h2>Audio manipulation</h2> + <ul> + <li><a href="audio_related/voice_cloning/reasoning.html">Voice cloning (of youtuberin NesfateLP)</a></li> + </ul> +</div> + +<div> + <h2> + <a href="./contacts.html"> + Contacts + </a> + </h2> +</div> + + +</div> +</body> diff --git a/nessi_avatar.jpg b/nessi_avatar.jpg Binary files differnew file mode 100644 index 0000000..1b424a7 --- /dev/null +++ b/nessi_avatar.jpg diff --git a/nessi_generated.jpg b/nessi_generated.jpg Binary files differnew file mode 100644 index 0000000..d7bec3d --- /dev/null +++ b/nessi_generated.jpg diff --git a/replace_phrase.sh b/replace_phrase.sh new file mode 100755 index 0000000..1b61476 --- /dev/null +++ b/replace_phrase.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +# phrase=$(cat phrase) +phrase=${1:-"test phrase"} + +echo "$phrase" + +# if multiline +# https://stackoverflow.com/questions/10107459/replace-a-word-with-multiple-lines-using-sed/#22901380 +# escapedPhrase="$(echo "${phrase}" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/\$/\\$/g')" + +# just do oneline +phrase=$(echo $phrase | tr "\n" " ") + +sed -i -e "s|\(<p id=phrase>\)\(.*\)\(</p>\)|\1${phrase}\3|" index.html diff --git a/todays_audio.opus b/todays_audio.opus Binary files differnew file mode 100644 index 0000000..1c19722 --- /dev/null +++ b/todays_audio.opus diff --git a/todays_audio.opus.json b/todays_audio.opus.json new file mode 100644 index 0000000..9b40607 --- /dev/null +++ b/todays_audio.opus.json @@ -0,0 +1 @@ +{"text": " Aber jedes einzelne Brett ist dick und sie haben keine L\u00fccken dazwischen, also sieht es gut aus.", "segments": [{"id": 0, "seek": 0, "start": 0.0, "end": 5.5200000000000005, "text": " Aber jedes einzelne Brett ist dick und sie haben keine L\u00fccken dazwischen, also sieht es gut aus.", "tokens": [50364, 5992, 36119, 36731, 716, 29447, 1418, 18659, 674, 2804, 3084, 9252, 441, 26037, 274, 921, 86, 6282, 11, 611, 14289, 785, 5228, 3437, 13, 50640], "temperature": 0.0, "avg_logprob": -0.22456582387288412, "compression_ratio": 1.0543478260869565, "no_speech_prob": 0.011318010278046131}], "language": "de"}
\ No newline at end of file diff --git a/todays_audio.opus.srt b/todays_audio.opus.srt new file mode 100644 index 0000000..e3f0449 --- /dev/null +++ b/todays_audio.opus.srt @@ -0,0 +1,4 @@ +1 +00:00:00,000 --> 00:00:05,520 +Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus. + diff --git a/todays_audio.opus.tsv b/todays_audio.opus.tsv new file mode 100644 index 0000000..bb197e2 --- /dev/null +++ b/todays_audio.opus.tsv @@ -0,0 +1,2 @@ +start end text +0 5520 Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus. diff --git a/todays_audio.opus.txt b/todays_audio.opus.txt new file mode 100644 index 0000000..d61204e --- /dev/null +++ b/todays_audio.opus.txt @@ -0,0 +1 @@ +Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus. diff --git a/todays_audio.opus.vtt b/todays_audio.opus.vtt new file mode 100644 index 0000000..5ec228d --- /dev/null +++ b/todays_audio.opus.vtt @@ -0,0 +1,5 @@ +WEBVTT + +00:00.000 --> 00:05.520 +Aber jedes einzelne Brett ist dick und sie haben keine Lücken dazwischen, also sieht es gut aus. + diff --git a/update_index.sh b/update_index.sh new file mode 100755 index 0000000..f675188 --- /dev/null +++ b/update_index.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +dir=${1:-} + +filepath=$(du -a $dir | awk '($1 > 50) {print $2}' | shuf -n 1) +echo "$filepath" +mpv "$filepath" + +cp "$filepath" todays_audio.opus + +whisper --model medium --language de --device cpu todays_audio.opus + +phrase=$(cat todays_audio.opus.txt) +./replace_phrase.sh "$phrase" + +./get_sd_image.sh "$phrase" |