Page MenuHomePhabricator

Phonos - update help
Closed, ResolvedPublic3 Estimated Story PointsFeature

Description

Feature summary (what you would like to be able to do and where):
Additional help documentation is requested for this extensions use

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Go to https://www.mediawiki.org/wiki/Help:Extension:Phonos#Deployment - not understand what is required, what is optional, what is used when multiple inputs are provided (more in comments below)

Benefits (why should this be implemented?):
Ensure that contributors can make use of this extension fully

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

It seems unclear of when and if the "IPA" parameter will be used vs the "text" parameter. Is one of these primary, is one a engine hint - we aren't really sure. The average editor seems to feel that what is put in the "IPA" parameter is what should be spoken, but this doesn't appear to be the case often. Also, using only the IPA parameter is often resulting in the error "The generated audio appears to be empty. The given IPA may be invalid, or is not supported by the engine. Using the 'text' parameter may help." even when what appears to be a properly formatted IPA string is provided.

They should stop requiring ipa="". Google TTS supports 53 languages but accepts IPA input for only 18 of them. It should also be renamed, as it accepts only Pinyin/Jyutping instead of IPA for Mandarin and Cantonese (how weird would it be not to support them?). At T320523#8453284 @Samwilson said he thinks Phonos should support whatever Google supports; I find it weird they don't appear to have committed to making this switch.

It seems unclear of when and if the "IPA" parameter will be used vs the "text" parameter. Is one of these primary, is one a engine hint - we aren't really sure. The average editor seems to feel that what is put in the "IPA" parameter is what should be spoken, but this doesn't appear to be the case often. Also, using only the IPA parameter is often resulting in the error "The generated audio appears to be empty. The given IPA may be invalid, or is not supported by the engine. Using the 'text' parameter may help." even when what appears to be a properly formatted IPA string is provided.

@Xaosflux I think part of the problem here is that this is opaque and hidden within Google. There are lots of seemingly-valid IPA strings that do not work, and there doesn't seem to be any way to determine whether it's ignoring ipa and using text instead (other than by leaving out text). Maybe this is what we should change in the documentation: highlight the fact that text shouldn't be used in most cases, unless a fallback is needed because ipa doesn't work? (In that situation, at the moment it's necessary to still provide ipa, but as @Nardog points out this should be made optional.)

It doesn't help us, but it's worth noting that Google is doing the wrong thing here anyway, according to the SSML spec which says that what we're passing as text should be "human-readable text that can be used for non-spoken rendering of the document" (my emphasis). It'd be nicer if they just returned an error if they can't work with the ipa given, but oh well.

There will be words for which using text won't work, of course, but hopefully a working IPA can be figured out for them. For example, different inflections of 'read':

WikitextSSMLNotes
<phonos lang="en_gb" ipa="ɹiːd">read</phonos><speak><phoneme alphabet="ipa" ph="&#x279;i&#x2D0;d"/></speak>
<phonos lang="en_gb" ipa="_" text="read a book">read</phonos><speak><phoneme alphabet="ipa" ph="_">read a book</phoneme></speak>Shouldn't have the <phoneme> element at all, probably.
<phonos lang="en_gb" ipa="ɹɛd">read</phonos><speak><phoneme alphabet="ipa" ph="&#x279;&#x25B;d"/></speak>
<phonos lang="en_gb" ipa="_" text="I read a book">read</phonos><speak><phoneme alphabet="ipa" ph="_">I read a book</phoneme></speak>

They should stop requiring ipa="". Google TTS supports 53 languages but accepts IPA input for only 18 of them. It should also be renamed, as it accepts only Pinyin/Jyutping instead of IPA for Mandarin and Cantonese (how weird would it be not to support them?). At T320523#8453284 @Samwilson said he thinks Phonos should support whatever Google supports; I find it weird they don't appear to have committed to making this switch.

I agree that Phonos should support other alphabets, but let's have those discussions on T324111: X-SAMPA support and T324109: Pinyin/Jyutping support for Chinese languages. As for not committing to working on those (and T324738: Add voice="" attribute, for selecting engine voice), it's just a matter of time; I think we will get it all done.

I'm not sure what the best thing to do is, but it is certainly very confusing.

Maybe this is what we should change in the documentation: highlight the fact that text shouldn't be used in most cases, unless a fallback is needed because ipa doesn't work?

I think that would be good, but it appears that even the en-GB/en-US engines are frequently failing on IPA entry and only making use of text -- my understanding was that concept wise 'text' was supposed to be an additional engine hint to improve on top of IPA - but IPA should just work, and it doesn't seem to be.

Noting that the help pages will need to be updated again for T332787: Add PhonosInlineAudioPlayerMode