HearingGame/assets/audio/audiogen.py

12 lines
435 B
Python
Raw Normal View History

2023-04-01 08:08:45 +02:00
mx = 8000
x = 0
alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
interval = int(mx/(len(alphabet)))
with open("genudio.sh", "w") as f:
for i in range(0, len(alphabet)):
letter = alphabet[x]
freq = (i+1) * interval
f.write(f'ffmpeg -f lavfi -i "sine=frequency={freq}:duration=5" {letter}.ogg\n')
x = x + 1