-
Notifications
You must be signed in to change notification settings - Fork 1
/
pico2wave.html
93 lines (87 loc) · 3.5 KB
/
pico2wave.html
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<script type="text/javascript">
RED.nodes.registerType('pico2wave',{
category: 'pico2wave',
color: '#00FA9A',
defaults: {
name: {value:""},
inputType: {value:"msg"},
inputProp: {value:"payload"},
outputProp: {value:"payload"},
language: {value:"en-US"},
outputToFile: {value:"buffer"},
manualPath: {value:""}
},
inputs:1,
outputs:1,
icon: "font-awesome/fa-comment-o",
label: function() {
return this.name||"pico2wave";
},
oneditprepare: function() {
var node = this;
$("#node-input-inputProp").typedInput({
type:"msg",
types:["msg","flow","global","str"],
typeField: "#node-input-inputType"
});
$("#node-input-outputProp").typedInput({
type:"msg",
types:["msg"]
});
$("#node-input-outputToFile").on("change", function(){
let output = $("#node-input-outputToFile").val();
if(output == "buffer"){
$("#outputPathWrapper").hide();
} else {
$("#outputPathWrapper").show();
}
});
}
});
</script>
<script type="text/html" data-template-name="pico2wave">
<h4>input / output</h4>
<div class="form-row">
<label for="node-input-inputProp"><i class="fa fa-sign-in"></i> input field</label>
<input type="text" id="node-input-inputProp">
<input type="hidden" id="node-input-inputType">
</div>
<div class="form-row">
<label for="node-input-outputProp"><i class="fa fa-sign-out"></i> output field</label>
<input type="text" id="node-input-outputProp">
</div>
<h4>settings</h4>
<div class="form-row">
<label for="node-input-language"><i class="fa fa-book"></i> language</label>
<select id="node-input-language">
<option value="en-US">English(US)</option>
<option value="en-GB">English(GB)</option>
<option value="fr-FR">French</option>
<option value="de-DE">German</option>
<option value="it-IT">Italian</option>
<option value="es-ES">Spanish</option>
</select>
</div>
<div class="form-row">
<label for="node-input-outputToFile"><i class="fa fa-hdd-o"></i> output as</label>
<select id="node-input-outputToFile">
<option value="buffer">a single buffer in the msg.payload</option>
<option value="file">a file on the local file system</option>
</select>
</div>
<div id="outputPathWrapper" class="form-row" style="display:inline;">
<div>
<label for="node-input-manualPath"><i class="icon-tag"></i>output File</label>
<input type="text" id="node-input-manualPath" placeholder="" style="display:inline-block; width: 60%; vertical-align:baseline;">
<label for="node-input-manualPath" id="outputExt" style="width: 10%;">.wav</label>
</div><br>
</div>
<h4>other</h4>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/html" data-help-name="pico2wave">
<p>a simple wrapper around the pico2wave commandline tts tool for use in nodered</p>
</script>