mirror of
https://github.com/ocogeclub/ocoge.git
synced 2024-11-24 16:39:49 +00:00
added aquestalk speech block
This commit is contained in:
parent
23281b6bd4
commit
7abefa0954
@ -748,6 +748,13 @@
|
||||
<field name="data" id=")H{jxG09B6}[PcO%4H1d" variabletype="">データ</field>
|
||||
</block>
|
||||
<block type="ugj_child_julius"></block>
|
||||
<block type="aquestalk_pi">
|
||||
<value name="talk">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">こんにちは</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="ugj_child_openjtalk">
|
||||
<field name="voice">m001</field>
|
||||
<value name="talk">
|
||||
|
4
index.js
4
index.js
@ -12,8 +12,8 @@ function createWindow() {
|
||||
win = new BrowserWindow({
|
||||
/** Icon */
|
||||
icon: "./icon.png",
|
||||
width: 800,
|
||||
height: 600,
|
||||
width: 660,
|
||||
height: 760,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
|
@ -1967,6 +1967,27 @@ Blockly.JavaScript['ugj_child_gesture'] = function (block) {
|
||||
return [code, Blockly.JavaScript.ORDER_NONE];
|
||||
};
|
||||
|
||||
// AquesTalk Pi
|
||||
Blockly.Blocks['aquestalk_pi'] = {
|
||||
init: function () {
|
||||
this.appendValueInput("talk")
|
||||
.setCheck("String")
|
||||
.appendField("ゆっくりで");
|
||||
this.appendDummyInput()
|
||||
.appendField("とおしゃべりする");
|
||||
this.setInputsInline(true);
|
||||
this.setOutput(true, "shcmd");
|
||||
this.setStyle('special_blocks')
|
||||
this.setTooltip("日本語音声合成プログラム「AquesTalk Pi」を使用してしゃべります。");
|
||||
this.setHelpUrl("");
|
||||
}
|
||||
};
|
||||
Blockly.JavaScript['aquestalk_pi'] = function (block) {
|
||||
var value_talk = Blockly.JavaScript.valueToCode(block, 'talk', Blockly.JavaScript.ORDER_ATOMIC);
|
||||
var code = `'./bin/aquestalkpi/AquesTalkPi ' + ${value_talk} + ' | aplay', { shell: true }`;
|
||||
return [code, Blockly.JavaScript.ORDER_NONE];
|
||||
};
|
||||
|
||||
// open jtalk
|
||||
Blockly.Blocks['ugj_child_openjtalk'] = {
|
||||
init: function () {
|
||||
|
Loading…
Reference in New Issue
Block a user