File size: 1,743 Bytes
19c8b95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
logger = setupData["logger"]
isDev = setupData["isDev"]
isCPUonly = setupData["isCPUonly"]
appVersion = setupData["appVersion"]

def output_audio_pre(data=None):
    global logger, isCPUonly
    logger.log(f'Output audio pre: {data}')

    hz = data["audio_options"]["hz"]
    padStart = data["audio_options"]["padStart"]
    padEnd = data["audio_options"]["padEnd"]
    bit_depth = data["audio_options"]["bit_depth"]
    amplitude = data["audio_options"]["amplitude"]
    input_path = data["input_path"]
    output_path = data["output_path"]
    game = data["game"]
    voiceId = data["voiceId"]
    voiceName = data["voiceName"]
    inputSequence = data["inputSequence"]
    letters = data["letters"]
    pitch = data["pitch"]
    durations = data["durations"]
    vocoder = data["vocoder"]
    # TODO: amplitude data, when it gets implemented

    logger.log("hz:   "+ hz)
    logger.log("padStart:   "+ str(padStart))
    logger.log("padEnd:   "+ str(padEnd))
    logger.log("bit_depth:   "+ bit_depth)
    logger.log("amplitude:   "+ amplitude)
    logger.log("input_path:   "+ input_path)
    logger.log("output_path:   "+ output_path)
    logger.log("game:   "+ game)
    logger.log("voiceId:   "+ voiceId)
    logger.log("voiceName:   "+ voiceName)
    logger.log("vocoder:   "+ vocoder)
    logger.log("inputSequence:   "+ inputSequence)
    logger.log("letters:   "+ ",".join(letters))
    logger.log("pitch:   "+ ",".join([str(item) for item in pitch]))
    logger.log("durations:   "+ ",".join([str(item) for item in  durations]))




# OPTIONAL
# ========
def setup(data=None):
    logger.log(f'Setting up plugin. App version: {data["appVersion"]} | CPU only: {data["isCPUonly"]} | Development mode: {data["isDev"]}')
# ========