From e95999a1275cc49d9fd0e58f5b85c08a0e0f88c3 Mon Sep 17 00:00:00 2001 From: will Date: Sun, 19 May 2024 20:52:53 +0100 Subject: [PATCH] fixed quotes in spaceweather.py --- spaceweather.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spaceweather.py b/spaceweather.py index e17c597..ac05111 100755 --- a/spaceweather.py +++ b/spaceweather.py @@ -52,7 +52,7 @@ def generate_bed(duration): #position the data and normalize source["data"] += source["min"] smooth = source["data"] - print(f"{i} -> average: {np.mean(source["data"])} min: {np.min(source["data"])} max: {np.max(source["data"])}") + print(f"{i} -> average: {np.mean(source['data'])} min: {np.min(source['data'])} max: {np.max(source['data'])}") source["data"] = np.round(source["data"]) # plot the data @@ -73,7 +73,7 @@ def generate_bed(duration): (f"synth {sr}s " # call effect and duration f"{source['type']} " # sets the type of synth eg:sine f"%{round(source['data'][p])} " - f"gain {source["gain"]}\n") # sets the frequency + f"gain {source['gain']}\n") # sets the frequency # f"{source['data'][p]}/{source['data'][p+1]} norm -12\n") # could be used for a linier sweep of frequencys ) @@ -172,7 +172,7 @@ def generate_html(transcript): graph_html = "
" + "".join([f"graph" for i in range(len(data))]) + "
" refs_html = "".join([ - f"

[{i+refs}] {data[i]["realname"]}. {data[i]["url"]}

" for i in range(len(data)) + f"

[{i+refs}] {data[i]['realname']}. {data[i]['url']}

" for i in range(len(data)) ]) template.insert(1, graph_html) @@ -223,7 +223,7 @@ print(f"duration: {round(duration, 2)} padding: {padding}") # pipe reccursion to join all the audio clips together call = f"sox {order[1]["file"]} -p pad 0 {padding}|" for clip in order[2:-2]: - call += f"sox - {clip["file"]} -p pad 0 {padding}|" + call += f"sox - {clip['file']} -p pad 0 {padding}|" call += f"sox --effects-file=config/voice.effects - audio/voice.wav" os.system(call) @@ -232,7 +232,7 @@ generate_bed(get_duration("audio/voice.wav")) # generate the full report print("finalizing...") -os.system(f"sox --effects-file=config/voice.effects {order[-1]["file"]} audio/last.wav") +os.system(f"sox --effects-file=config/voice.effects {order[-1]['file']} audio/last.wav") os.system(f"sox --combine mix-power audio/voice.wav audio/bed.wav audio/body.wav") os.system(f"sox --effects-file=config/master.effects audio/start.wav audio/body.wav audio/end.wav audio/last.wav spaceweather.wav") print("generated spaceweather!") -- 2.39.2