From 1d0f48cd6701c48b0a15d572b0fe7bfa13985cbf Mon Sep 17 00:00:00 2001 From: Lucas Cordiviola Date: Sat, 11 Jun 2022 05:16:35 -0300 Subject: [PATCH] update help patch --- flite-help.pd | 192 +++++++++++++++++++++++++------------------------- flite.c | 5 +- 2 files changed, 98 insertions(+), 99 deletions(-) diff --git a/flite-help.pd b/flite-help.pd index 62b7576..680433c 100644 --- a/flite-help.pd +++ b/flite-help.pd @@ -1,38 +1,34 @@ -#N canvas 297 24 793 696 10; +#N canvas 297 24 793 679 10; #X text 25 4 flite : text-to-speech synthesis with libflite; #N canvas 0 0 450 300 (subpatch) 0; -#X array words1 1.60234e+07 float 0; -#X coords 0 1 1.60234e+07 -1 100 70 1 0 0; -#X restore 521 310 graph; -#N canvas 0 0 450 300 (subpatch) 0; -#X array words2 112963 float 0; -#X coords 0 1 112962 -1 100 70 1; -#X restore 644 312 graph; -#X obj 29 617 print flite-synth-done; +#X array words2 109628 float 0; +#X coords 0 1 109627 -1 100 70 1; +#X restore 648 257 graph; +#X obj 29 640 print flite-synth-done; #X text 51 35 ARRAYNAME - initial array name; #X text 328 32 1 - control messages; #X text 321 59 1 - bang on completed synthesis; #X text 30 22 ARGUMENTS:; #X text 312 18 INLETS:; #X text 305 45 OUTLETS:; -#X msg 23 77 set words1; -#X msg 30 95 set words2; +#X msg 26 77 set words1; +#X msg 33 95 set words2; #X msg 66 144 synth; #X text 106 147 "synth" message synthesizes current text-buffer; #X text 159 122 "text" message sets input text-buffer; #X text 104 83 "set" message selects the output array; #X text 246 267 "list" messages set text and synthesize; -#X obj 521 246 dac~; -#X msg 605 74 \; pd dsp 1; -#X msg 671 74 \; pd dsp 0; -#X text 499 124 For playback \, you can use 'tabplay~':; -#X msg 522 165 set words1; -#X msg 527 185 set words2; -#X msg 631 167 bang; -#X msg 682 168 stop; -#X msg 631 145 start; -#X text 381 585 ACKNOWLEDGEMENTS:; -#X text 399 600 Flite runtime speech synthesis library by Alan W Black +#X obj 516 234 dac~; +#X msg 601 66 \; pd dsp 1; +#X msg 667 66 \; pd dsp 0; +#X text 495 116 For playback \, you can use 'tabplay~':; +#X msg 517 146 set words1; +#X msg 527 166 set words2; +#X msg 635 170 bang; +#X msg 686 171 stop; +#X msg 635 148 start; +#X text 406 570 ACKNOWLEDGEMENTS:; +#X text 424 585 Flite runtime speech synthesis library by Alan W Black and Kevin A. Lenzo.; #X msg 94 271 list bang bahda boobop; #N canvas 260 141 494 344 META 0; @@ -44,9 +40,9 @@ Wilkes for Pd version 0.42.; #X text 12 65 INLET_0 set text synth list; #X text 12 85 OUTLET_0 bang; #X text 12 105 AUTHOR Bryan Jurish ; -#X restore 705 656 pd META; +#X restore 730 641 pd META; #X msg 60 122 text test 123; -#X text 384 639 Bryan Jurish ; +#X text 409 624 Bryan Jurish ; #X msg 110 296 awb; #X msg 143 296 kal; #X msg 178 295 kal16; @@ -54,13 +50,12 @@ Wilkes for Pd version 0.42.; #X msg 253 296 slt; #X msg 111 348 voice \$1; #X obj 110 329 symbol; -#X obj 160 420 openpanel; -#X obj 142 420 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#X obj 156 438 openpanel; +#X obj 135 438 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; -#X text 174 326 "voice" messages sets the voice; -#X text 239 510 "textfile" message reads a text file and synthesize +#X text 235 528 "textfile" message reads a text file and synthesize , f 53; -#X msg 159 510 textfile \$1; +#X msg 155 528 textfile \$1; #N canvas 26 26 633 528 longtext 0; #X obj 241 -91 inlet; #X obj 239 355 outlet; @@ -99,78 +94,81 @@ test 123 test 123 test 123 test 123 test 123 test 123 test 123; #X connect 0 0 2 0; #X connect 2 0 1 0; #X restore 87 171 pd longtext; -#X obj 176 172 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#X obj 164 171 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; -#X msg 93 244 thrd_synth; -#X obj 522 275 array define words; -#X obj 28 592 flite words; -#X obj 521 219 tabplay~ words; -#X msg 185 550 thrd_textfile \$1; -#X obj 159 465 route 0 1; -#X obj 159 488 symbol; -#X obj 185 530 symbol; -#X obj 256 443 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 +#X msg 90 242 thrd_synth; +#X msg 181 573 thrd_textfile \$1; +#X obj 155 483 route 0 1; +#X obj 155 506 symbol; +#X obj 181 553 symbol; +#X obj 252 461 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1; -#X msg 13 58 set words; -#X msg 515 143 set words; -#X text 159 243 "threaded" synthesis of the current text buffer; -#X text 295 545 threaded version, f 18; -#X text 273 443 threaded, f 10; -#X obj 159 445 list prepend 0; -#X text 498 392 Warnings: better not use graphical arrays for threaded +#X text 160 242 "threaded" synthesis of the current text buffer; +#X text 293 569 threaded version, f 9; +#X text 269 461 threaded, f 10; +#X obj 155 463 list prepend 0; +#X text 502 337 Warnings: better not use graphical arrays for threaded synthesis. Also be careful to not synthesize to an array which is currently playing., f 46; -#X text 386 657 v0.03 updated by Lucas Cordiviola; -#X obj 72 222 list trim; +#X text 411 642 v0.03 updated by Lucas Cordiviola; +#X obj 82 212 list trim; #X text 227 175 Threaded "text" message sets input text-buffer, f 21; -#X msg 122 391 voice_file \$1; -#X msg 128 371 symbol cmu_us_ljm.flitevox; -#X text 237 392 load a .flitevox voice file (english); -#X msg 228 420 ./README.md; -#X obj 679 232 noise~; -#X obj 686 263 *~ 0.1; +#X msg 133 393 voice_file \$1; +#X msg 134 373 symbol cmu_us_ljm.flitevox; +#X msg 224 438 ./README.md; #X obj 83 192 list prepend text; -#X connect 10 0 48 0; -#X connect 11 0 48 0; -#X connect 12 0 48 0; -#X connect 21 0 49 0; -#X connect 22 0 49 0; -#X connect 23 0 49 0; -#X connect 24 0 49 0; -#X connect 25 0 23 0; -#X connect 28 0 48 0; -#X connect 30 0 48 0; -#X connect 32 0 38 0; -#X connect 33 0 38 0; -#X connect 34 0 38 0; -#X connect 35 0 38 0; -#X connect 36 0 38 0; -#X connect 37 0 48 0; -#X connect 38 0 37 0; -#X connect 39 0 60 0; -#X connect 40 0 39 0; -#X connect 43 0 48 0; -#X connect 44 0 71 0; -#X connect 45 0 44 0; -#X connect 46 0 48 0; -#X connect 48 0 3 0; -#X connect 49 0 17 0; -#X connect 49 0 17 1; -#X connect 50 0 48 0; -#X connect 51 0 52 0; -#X connect 51 1 53 0; -#X connect 52 0 43 0; -#X connect 53 0 50 0; -#X connect 54 0 60 1; -#X connect 55 0 48 0; -#X connect 56 0 49 0; -#X connect 60 0 51 0; -#X connect 63 0 48 0; -#X connect 65 0 48 0; -#X connect 66 0 65 0; -#X connect 68 0 60 0; -#X connect 69 0 70 0; -#X connect 70 0 17 1; -#X connect 70 0 17 0; -#X connect 71 0 63 0; +#X obj 516 278 array define words1; +#X obj 28 615 flite words1; +#X obj 517 211 tabplay~ words1; +#X text 172 342 "voice" messages sets one of the built-in voices; +#X text 227 391 load a .flitevox voice file (english), f 38; +#N canvas 26 26 450 300 get-voices 0; +#X obj 116 192 pdcontrol; +#X msg 117 165 browse http://cmuflite.org/packed/flite-2.0/voices/ +; +#X obj 171 105 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc +#000000 #000000; +#X text 103 104 get voices; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X coords 0 -1 1 1 90 25 2 100 100; +#X restore 369 408 pd get-voices; +#X connect 9 0 63 0; +#X connect 10 0 63 0; +#X connect 11 0 63 0; +#X connect 20 0 64 0; +#X connect 21 0 64 0; +#X connect 22 0 64 0; +#X connect 23 0 64 0; +#X connect 24 0 22 0; +#X connect 27 0 63 0; +#X connect 29 0 63 0; +#X connect 31 0 37 0; +#X connect 32 0 37 0; +#X connect 33 0 37 0; +#X connect 34 0 37 0; +#X connect 35 0 37 0; +#X connect 36 0 63 0; +#X connect 37 0 36 0; +#X connect 38 0 53 0; +#X connect 39 0 38 0; +#X connect 41 0 63 0; +#X connect 42 0 61 0; +#X connect 43 0 42 0; +#X connect 44 0 63 0; +#X connect 45 0 63 0; +#X connect 46 0 47 0; +#X connect 46 1 48 0; +#X connect 47 0 41 0; +#X connect 48 0 45 0; +#X connect 49 0 53 1; +#X connect 53 0 46 0; +#X connect 56 0 63 0; +#X connect 58 0 63 0; +#X connect 59 0 58 0; +#X connect 60 0 53 0; +#X connect 61 0 56 0; +#X connect 63 0 2 0; +#X connect 64 0 16 0; +#X connect 64 0 16 1; diff --git a/flite.c b/flite.c index 5c79c59..e9e9d84 100644 --- a/flite.c +++ b/flite.c @@ -218,7 +218,7 @@ static void flite_synth(t_flite *x) { clock_delay(x->x_clock, 0); - return; + //return; } /*-------------------------------------------------------------------- @@ -250,7 +250,7 @@ static void flite_do_textbuffer(t_flite *x) { binbuf_free(bbuf); x->textbuf = (char *) calloc(length+1, sizeof(char)); memcpy(x->textbuf, buf, length); - freebytes(buf, length); + freebytes(buf, length+1); x->x_inprogress = 0; #ifdef FLITE_DEBUG @@ -596,6 +596,7 @@ static void flite_free(t_flite *x) { x->bufsize = 0; }*/ free(x->textbuf); + clock_free(x->x_clock); } /*--------------------------------------------------------------------