mirror of
https://github.com/ocogeclub/ocoge.git
synced 2024-11-21 23:29:48 +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>
|
<field name="data" id=")H{jxG09B6}[PcO%4H1d" variabletype="">データ</field>
|
||||||
</block>
|
</block>
|
||||||
<block type="ugj_child_julius"></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">
|
<block type="ugj_child_openjtalk">
|
||||||
<field name="voice">m001</field>
|
<field name="voice">m001</field>
|
||||||
<value name="talk">
|
<value name="talk">
|
||||||
|
4
index.js
4
index.js
@ -12,8 +12,8 @@ function createWindow() {
|
|||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
/** Icon */
|
/** Icon */
|
||||||
icon: "./icon.png",
|
icon: "./icon.png",
|
||||||
width: 800,
|
width: 660,
|
||||||
height: 600,
|
height: 760,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
|
@ -1967,6 +1967,27 @@ Blockly.JavaScript['ugj_child_gesture'] = function (block) {
|
|||||||
return [code, Blockly.JavaScript.ORDER_NONE];
|
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
|
// open jtalk
|
||||||
Blockly.Blocks['ugj_child_openjtalk'] = {
|
Blockly.Blocks['ugj_child_openjtalk'] = {
|
||||||
init: function () {
|
init: function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user