[med-svn] [Git][med-team/praat][master] 3 commits: New upstream version 6.3.20+dfsg

Rafael Laboissière (@rafael) gitlab at salsa.debian.org
Wed Oct 25 09:42:55 BST 2023



Rafael Laboissière pushed to branch master at Debian Med / praat


Commits:
1351af16 by Rafael Laboissière at 2023-10-25T01:23:02-03:00
New upstream version 6.3.20+dfsg
- - - - -
3a27689c by Rafael Laboissière at 2023-10-25T01:24:16-03:00
Update upstream source from tag 'upstream/6.3.20+dfsg'

Update to upstream version '6.3.20+dfsg'
with Debian dir aab27442b0ada2acd002dce6f5385ed837fe2b24
- - - - -
c6687845 by Rafael Laboissière at 2023-10-25T03:07:24-03:00
d/changelog: Add entry for release 6.3.20+dfsg-1

Gbp-Dch: Ignore

- - - - -


6 changed files:

- debian/changelog
- dwtools/SpeechSynthesizer.cpp
- external/espeak/speech.cpp
- fon/manual_scripting.cpp
- fon/manual_whatsnew.cpp
- sys/praat_version.h


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+praat (6.3.20+dfsg-1) unstable; urgency=medium
+
+  * New upstream version 6.3.20+dfsg
+
+ -- Rafael Laboissière <rafael at debian.org>  Wed, 25 Oct 2023 01:47:26 -0300
+
 praat (6.3.19+dfsg-1) unstable; urgency=medium
 
   * New upstream version 6.3.19+dfsg


=====================================
dwtools/SpeechSynthesizer.cpp
=====================================
@@ -329,7 +329,10 @@ static int synthCallback (short *wav, int numsamples, espeak_EVENT *events)
 			} else {
 				// Ugly hack because id.string is not 0-terminated if 8 chars long!
 				memcpy (phoneme_name, events -> id.string, 8);
-				phoneme_name [8] = 0;
+				//phoneme_name [8] = 0;
+				phoneme_name [4] = 0;   // ppgb UGLY HACK IN ORDER TO MAKE FEWER MISTAKES (20231022)
+				//TRACE
+				trace (U"phoneme name <<", Melder_peek8to32 (phoneme_name), U">>");
 				Table_setStringValue (my d_events.get(), irow, 8, Melder_peek8to32 (phoneme_name));
 			}
 			Table_setNumericValue (my d_events.get(), irow, 9, events -> unique_identifier);
@@ -436,8 +439,16 @@ static autoSound buffer_to_Sound (constINTVEC const& wav, double samplingFrequen
 }
 
 static void IntervalTier_addBoundaryUnsorted (IntervalTier me, integer iinterval, double time, conststring32 newLabel, bool isNewleftLabel) {
+	//TRACE
+	trace (U"size before: ", my intervals.size);
+	for (integer i = 1; i <= my intervals.size; i ++)
+		trace (U"phoneme ", i, U" ", my intervals.at [i] -> xmin, U" ", my intervals.at [i] -> xmax,
+				U" ", Melder_length (my intervals.at [i] -> text.get()), U" ", my intervals.at [i] -> text.get());
+
+	trace (U"isNewLeftLabel: ", isNewleftLabel);
+	trace (U"iinterval: ", iinterval);
 	Melder_require (time > my xmin && time < my xmax,
-		U"Time is outside interval domains.");
+		U"The time (", time, U" seconds) is not inside the domain of the interval tier (", my xmin, U" .. ", my xmax, U" seconds).");
 	/*
 		Find interval to split
 	*/
@@ -447,11 +458,19 @@ static void IntervalTier_addBoundaryUnsorted (IntervalTier me, integer iinterval
 		Modify end time of left label
 	*/
 	const TextInterval ti = my intervals.at [iinterval];
+	trace (U"end time ", ti -> xmax, U" overridden by ", time);
 	ti -> xmax = time;
-	if (isNewleftLabel)
+	if (isNewleftLabel) {
+		trace (U"label <<", ti -> text.get(), U">> overridden by ", newLabel);
 		TextInterval_setText (ti, newLabel);
+	}
 	autoTextInterval ti_new = TextInterval_create (time, my xmax, (! isNewleftLabel ? newLabel : U"" ));
 	my intervals. addItem_unsorted_move (ti_new.move());
+
+	trace (U"size after: ", my intervals.size);
+	for (integer i = 1; i <= my intervals.size; i ++)
+		trace (U"phoneme ", i, U" ", my intervals.at [i] -> xmin, U" ", my intervals.at [i] -> xmax,
+				U" ", Melder_length (my intervals.at [i] -> text.get()), U" ", my intervals.at [i] -> text.get());
 }
 
 static void Table_setEventTypeString (Table me) {
@@ -601,7 +620,7 @@ static autoTextGrid Table_to_TextGrid (Table me, conststring32 text, double xmin
 		const IntervalTier words = (IntervalTier) thy tiers->at [3];
 		const IntervalTier phonemes = (IntervalTier) thy tiers->at [4];
 		for (integer irow = 1; irow <= numberOfRows; irow ++) {
-			const double time = Table_getNumericValue_a (me, irow, timeColumnIndex);
+			/*const*/ double time = Table_getNumericValue_a (me, irow, timeColumnIndex);
 			const int type = Table_getNumericValue_a (me, irow, typeColumnIndex);
 			const integer pos = Table_getNumericValue_a (me, irow, tposColumnIndex);
 			integer length;
@@ -656,19 +675,47 @@ static autoTextGrid Table_to_TextGrid (Table me, conststring32 text, double xmin
 				p1w = pos;
 			} else if (type == espeakEVENT_PHONEME) {
 				const conststring32 phoneme = Table_getStringValue_a (me, irow, idColumnIndex);
-				if (time > time_phon_p) {
-					/*
-						Insert new boudary and label interval with the phoneme
-						TODO: Translate the phoneme to the correct notation
-					*/
-					TextInterval ti = phonemes -> intervals.at [phonemes -> intervals.size];
-					if (time > ti -> xmin && time < ti -> xmax)
-						IntervalTier_addBoundaryUnsorted (phonemes, phonemes -> intervals.size, time, phoneme, false);
+				//TRACE
+				trace (U"found in table the phoneme <<", phoneme, U">>, to be inserted at ", time, U" (usually after ", time_phon_p, U")");
+				const TextInterval lastPhonemeInterval = phonemes -> intervals.at [phonemes -> intervals.size];
+				if (false) {
+					if (time > time_phon_p) {
+						/*
+							Insert new boundary and label interval with the phoneme.
+							TODO: Translate the phoneme to the correct notation
+						*/
+						if (time > lastPhonemeInterval -> xmin && time < lastPhonemeInterval -> xmax) {
+							trace (U"add boundary (1) for phoneme <<", phoneme, U">> at ", time);
+							IntervalTier_addBoundaryUnsorted (phonemes, phonemes -> intervals.size, time, phoneme, false);
+						}
+					} else {
+						/*
+							Just in case the phoneme starts at xmin, we only need to set interval text.
+						*/
+						trace (U"overriding <<", lastPhonemeInterval -> text.get(), U">> with <<", phoneme, U">>");
+						TextGrid_setIntervalText (thee.get(), 4, phonemes -> intervals.size, phoneme);
+					}
 				} else {
-					/*
-						Just in case the phoneme starts at xmin, we only need to set interval text.
-					*/
-					TextGrid_setIntervalText (thee.get(), 4, phonemes -> intervals.size, phoneme);
+					if (time > time_phon_p) {
+						/*
+							Insert new boundary and label interval with the phoneme.
+							TODO: Translate the phoneme to the correct notation
+						*/
+						if (time > lastPhonemeInterval -> xmin && time < lastPhonemeInterval -> xmax) {
+							trace (U"add boundary (1) for phoneme <<", phoneme, U">> at ", time);
+							IntervalTier_addBoundaryUnsorted (phonemes, phonemes -> intervals.size, time, phoneme, false);
+						}
+					} else if (! Melder_equ (phoneme, U"")) {
+						/*
+							Just in case the phoneme starts at xmin, we only need to set interval text.
+						*/
+						trace (U"overriding <<", lastPhonemeInterval -> text.get(), U">> with <<", phoneme, U">>");
+						TextGrid_setIntervalText (thee.get(), 4, phonemes -> intervals.size, phoneme);
+					} else {
+						time = 0.001 * lastPhonemeInterval -> xmax + 0.999 * lastPhonemeInterval -> xmin;
+						trace (U"add boundary (2) for phoneme <<", phoneme, U">> at ", time);
+						IntervalTier_addBoundaryUnsorted (phonemes, phonemes -> intervals.size, time, phoneme, false);
+					}
 				}
 				time_phon_p = time;
 			}


=====================================
external/espeak/speech.cpp
=====================================
@@ -49,6 +49,8 @@
 #include "speak_lib.h"
 #include "encoding.h"
 
+#include "melder.h"
+
 #include "speech.h"
 #include "common.h"               // for GetFileLength
 #include "dictionary.h"           // for GetTranslatedPhonemeString, strncpy0
@@ -534,8 +536,11 @@ void MarkerEvent(int type, unsigned int char_position, int value, int value2, un
 	else if (type == espeakEVENT_PHONEME) {
 		int *p;
 		p = (int *)(ep->id.string);
+		//TRACE
+		trace (U"values ", ((char*)&value)[0], U" ", ((char*)&value)[1], U" ", ((char*)&value)[2], U" ", ((char*)&value)[3], U" ",
+			((char*)&value2)[0], U" ", ((char*)&value2)[1], U" ", ((char*)&value2)[2], U" ", ((char*)&value2)[3]);
 		p[0] = value;
-		p[1] = value2;
+		p[1] = value2;   // ppgb SETTING THIS TO 0 HAS BEEN AN UGLY HACK IN ORDER TO MAKE FEWER MISTAKES (20231022)
 	} else
 		ep->id.number = value;
 }


=====================================
fon/manual_scripting.cpp
=====================================
@@ -2708,7 +2708,7 @@ TERM (U"##--no-pref-files#")
 DEFINITION (U"Ignore the preferences file and the buttons file at start-up, and don't write them when quitting (see above).")
 TERM (U"##--no-plugins#")
 DEFINITION (U"Don't activate the plugins at start-up.")
-TERM (U"##--pref-dir=#/var/www/praat_plugins")
+TERM (U"##--pref-dir=#`/var/www/praat_plugins`")
 DEFINITION (U"Set the preferences folder to `/var/www/praat_plugins` (for instance). "
 	"This can come in handy if you require access to preference files and/or plugins that are not in your home folder.")
 TERM (U"##-8#, ##--utf8#")


=====================================
fon/manual_whatsnew.cpp
=====================================
@@ -29,6 +29,13 @@ R"~~~(
 
 Latest changes in Praat.
 
+##6.3.20# (24 October 2023)
+• SpeechSynthesizer and automatic alignment in TextGridEditor: worked around a bug
+  introduced in 6.3.18 that caused incorrect rendering of phonemes consisting
+  of four UTF-8 bytes (such as /ɔː/).
+• SpeechSynthesizer and automatic alignment in TextGridEditor: worked around a very
+  old bug that deleted word-final /l/ in Dutch and English.
+
 ##6.3.19# (20 October 2023)
 • MacOS: resolved a crash when Praat started up on macOS 12 or older
   (worked around a bug in the Xcode linker that comes with macOS 14 Sonoma).


=====================================
sys/praat_version.h
=====================================
@@ -1,5 +1,5 @@
-#define PRAAT_VERSION_STR 6.3.19
-#define PRAAT_VERSION_NUM 6319
+#define PRAAT_VERSION_STR 6.3.20
+#define PRAAT_VERSION_NUM 6320
 #define PRAAT_YEAR 2023
 #define PRAAT_MONTH October
-#define PRAAT_DAY 20
+#define PRAAT_DAY 24



View it on GitLab: https://salsa.debian.org/med-team/praat/-/compare/fe1a872377351366bcbb33f33317ee34c63b5da8...c668784547ad2c770dd36a03343b0e6d4f728240

-- 
View it on GitLab: https://salsa.debian.org/med-team/praat/-/compare/fe1a872377351366bcbb33f33317ee34c63b5da8...c668784547ad2c770dd36a03343b0e6d4f728240
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231025/e5ceece9/attachment-0001.htm>


More information about the debian-med-commit mailing list