speaker_helper.eardrum.intonation module
Intonation: the final melody a sentence’s own form calls for.
Module summary
The prosody loop compares what the voice did with what the text asks for. For the end of a sentence, what the text asks for follows from its form, and the form is readable from the words — no model needed:
French (Delais-Roussarie et al. 2015, Intonational phonology of French, in Frota & Prieto, Intonation in Romance, OUP; Di Cristo 1998):
a statement (
.) falls; an exclamation (!) falls, with a wider range;a yes/no question with no question marker (“Tu viens ?”) rises — the rise is the only thing that makes it a question;
tag and echo questions (”…, non ?”, “…, n’est-ce pas ?”, “Quoi ?”) rise;
“est-ce que …?” and subject-verb inversion (“Viens-tu ?”) may rise or fall;
a question opened by a wh-word (“Où vas-tu ?”, “Pourquoi … ?”) falls or may rise; a wh-word left at the end (“Tu vas où ?”) may do either;
an alternative question (”… A ou B ?”) falls on its last term.
English: yes/no questions with an inverted auxiliary prefer a rise, a declarative question rises, wh-questions and alternatives fall, statements and exclamations fall, tags may do either.
The answer is "rise", "fall" or "either". "either" is a real
answer, not a shrug: the loop then accepts any contour, because forcing one
would correct a reading that is not wrong.
Usage example
>>> expected_contour("Tu viens ce soir ?", "fr").shape
'rise'
>>> expected_contour("Où vas-tu ce soir ?", "fr").shape
'fall'
- class speaker_helper.eardrum.intonation.ExpectedContour(shape, reason)[source]
Bases:
objectThe final melody a sentence calls for, and why.
- speaker_helper.eardrum.intonation.contour_agrees(expected, heard)[source]
Whether a heard contour satisfies the expected one.
- Parameters:
expected (ExpectedContour) – What the text calls for.
heard (str or None) –
"rise","fall","level", orNonewhen nothing could be measured.
- Returns:
Nonewhen the contour could not be measured;Truewhen the text accepts either, or the shapes match;Falseotherwise. Alevelending satisfies onlyeither.- Return type:
bool or None
Examples
>>> contour_agrees(ExpectedContour("rise", ""), "fall") False >>> contour_agrees(ExpectedContour("either", ""), "level") True
- speaker_helper.eardrum.intonation.expected_contour(sentence, language)[source]
The final contour
sentence’s form calls for.- Parameters:
- Returns:
The shape and the reason.
- Return type:
Examples
>>> expected_contour("Tu vas où ?", "fr").shape 'either' >>> expected_contour("Are you coming tonight?", "en").shape 'rise' >>> expected_contour("Where are you going?", "en").shape 'fall'