add initial marp implementation with sample content and build configuration
This commit is contained in:
35
node_modules/speech-rule-engine/mjs/audio/sable_renderer.js
generated
vendored
Normal file
35
node_modules/speech-rule-engine/mjs/audio/sable_renderer.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import * as EngineConst from '../common/engine_const.js';
|
||||
import { XmlRenderer } from './xml_renderer.js';
|
||||
export class SableRenderer extends XmlRenderer {
|
||||
finalize(str) {
|
||||
return ('<?xml version="1.0"?>' +
|
||||
'<!DOCTYPE SABLE PUBLIC "-//SABLE//DTD SABLE speech mark up//EN"' +
|
||||
' "Sable.v0_2.dtd" []><SABLE>' +
|
||||
this.separator +
|
||||
str +
|
||||
this.separator +
|
||||
'</SABLE>');
|
||||
}
|
||||
pause(pause) {
|
||||
return ('<BREAK ' +
|
||||
'MSEC="' +
|
||||
this.pauseValue(pause[EngineConst.personalityProps.PAUSE]) +
|
||||
'"/>');
|
||||
}
|
||||
prosodyElement(tag, value) {
|
||||
value = this.applyScaleFunction(value);
|
||||
switch (tag) {
|
||||
case EngineConst.personalityProps.PITCH:
|
||||
return '<PITCH RANGE="' + value + '%">';
|
||||
case EngineConst.personalityProps.RATE:
|
||||
return '<RATE SPEED="' + value + '%">';
|
||||
case EngineConst.personalityProps.VOLUME:
|
||||
return '<VOLUME LEVEL="' + value + '%">';
|
||||
default:
|
||||
return '<' + tag.toUpperCase() + ' VALUE="' + value + '">';
|
||||
}
|
||||
}
|
||||
closeTag(tag) {
|
||||
return '</' + tag.toUpperCase() + '>';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user