Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Country / Capital pronunciation #81

Open
peterkrieg opened this issue Feb 5, 2019 · 54 comments
Open

Country / Capital pronunciation #81

peterkrieg opened this issue Feb 5, 2019 · 54 comments
Labels
conception Scope of the deck, memorisation, contribution guidelines, etc.

Comments

@peterkrieg
Copy link

peterkrieg commented Feb 5, 2019

Great deck, thanks for sharing! Wondering if you have any plans to add audio pronunciations for countries/ capitals? It could be very helpful to have audio of how to pronounce difficult cities like "ljubljana" for example. I'm happy to help with this if it's of interest.

@axelboc
Copy link
Collaborator

axelboc commented Feb 5, 2019

Hi, thanks a lot for the suggestion!

I'm a little concerned about the impact this would have on the size of the deck. This is something I've been particularly careful with, as storage space can be quite scarce on smartphones...

Also, that's just my opinion but I feel that pronunciation is the sort of thing you can look for on Wikipedia if you're curious -- you don't really need it constantly and it's not relevant for many cards.

Let's keep this issue open so people can react to it and see what the general consensus is in a few months.

@Erim24
Copy link
Collaborator

Erim24 commented Feb 19, 2019

As a less space consuming option I could imagine something like the names written in the international phonetic alphabet. Unfortunately it's not available for all of the countries or cities but for some of the harder to pronounce ones.

@peterkrieg
Copy link
Author

@axelboc thanks for the response!

I personally think the size if negligible for modern day phones. It looks like a typical pronunciation mp3 file would be ~10kb and so, with say ~200 difficult city/country pronunciations that would be a total of 2MB added, or less than the size of one song. But, I do understand if you want to keep the deck small (it's currently at 11.2MB).

In my opinion the pronunciation is actually more important, since then you can talk with people about countries/capitals. I agree for some cards it could be left out, and only included for hard ones.

But admittedly I think it would be hard to find pronunciations for some of the words, and it brings up the question as to if you should use the native speaker pronunciation or the english adapted one.

Anyways, just some thoughts!

@axelboc axelboc added the conception Scope of the deck, memorisation, contribution guidelines, etc. label Mar 17, 2019
@ohare93
Copy link
Member

ohare93 commented Apr 24, 2019

I agree completely with @Erim24, the IPA (International Phonetic Language) is perfect for this task. I've already added some pronunciations to my own cards, because of how difficult it was to recall a word I couldn't even pronounce. I got all of these straight from the wiki page entry for the country/capital, so it's not difficult to find. Some examples include:

  • Naypyidaw
    /nèpjìdɔ̀/

  • Ulaanbaatar
    /ˌuːlɑːnˈbɑːtər/

  • Kyrgyzstan
    /ˌkɜːrɡɪˈstɑːn/

  • Phnom Penh
    /ˈnɒmˈpɛn/

  • Chișinău
    /ˌkɪʃɪˈnaʊ/

  • Ouagadougou
    /ˌwɑːɡəˈduːɡuː/

I image the main critique would be "but most people cannot read IPA so what use would it be?" Well even for those who know nothing about IPA it would still serve to help them read the country name, because 70% of IPA characters are obvious and the same as English when taken by themselves, which can give insight into how to pronounce Countries/Capitals.

Take "Chișinău" and it's IPA /ˌkɪʃɪˈnaʊ/, for instance. Even if you don't know that "ʃ" is a "sh" sound and a "ʊ" is an oo sound (like in "hook"), it is obvious what "k" sounds like. The IPA will convey to a layman that "Chișinău" begins with a "k" sound, and not a "ch" sound. Same with the start of "Ouagadougou" being a w, and "Phnom Penh" being an n. In this way IPA will be somewhat useful to all, but of course more useful to this who can read it.

Furthermore, if all countries had an IPA then users of this deck would also slowly learn IPA through exposure to the countries/capitals that they already know how to pronounce.

Using IPA in this deck will allow for

  • Faster learning
    Less decisions "How is this pronounced?"
    Less uncertainty, which is the bane of recall like this

  • Higher accuracy
    More likely to recognise a country/capital when you hear it, or discuss with someone
    Why memorise all the countries/capitals/flags of the world if you are unable to correctly answer them in a pub quiz? 😉

@axelboc
Copy link
Collaborator

axelboc commented Apr 28, 2019

You're making a very good case for the IPA, there. It can indeed give clues to people who don't know it. Could it also induce errors, though? Are there IPA characters that could be interpreted incorrectly?

It's worth noting that the phonetic words would have to be added and maintained for every language supported by the deck. It might get cumbersome, especially if more translations are included in the future.

You've all convinced me that pronunciation is worth including in the deck, but so far I'd be a lot more inclined to add pronunciation hints only to countries and capitals that really warrant them, as @peterkrieg's initially suggested. Providing an audio snippet next to the IPA pronunciation would then be acceptable in terms of deck size, and, I believe, would prove more useful than IPA alone.

In this scenario, the difficulty would be to decide which countries and capitals should come with pronunciation hints. I'd argue that Naypyidaw and Kyrgyzstan, for instance, should not because mispronouncing them doesn't prevent understanding. Phnom Penh, Chișinău and Ljubljana, however, should because saying Fnom Pen, for instance, would most likely lead to misunderstanding. What do you all think?

@ohare93
Copy link
Member

ohare93 commented Apr 28, 2019

Could it also induce errors, though? Are there IPA characters that could be interpreted incorrectly?

I don't quite understand your question. Each character has one way to pronounce it, one phonetic way. Combinations of some characters can make different sounds "Diphthongs" but there is still one way to pronounce them.

It's worth noting that the phonetic words would have to be added and maintained for every language supported by the deck. It might get cumbersome, especially if more translations are included in the future.

True. But looking at this, some languages will have a place with a difficult name which is not difficult in another language. Therefore it is acceptable (and expected) to have the decks diverge in their implementation of phonetics. Also this is also an extra helpful feature, not something necessary for learning.

What do you all think?
Sounds good 👍

@axelboc
Copy link
Collaborator

axelboc commented Apr 28, 2019

I don't quite understand your question.

My bad, I was referring to what you said about "70% of IPA characters [being] obvious and the same as English when taken by themselves". My question was: amongst the remaining 30%, are some characters deceptive? That is, do some of them seem like they have an obvious pronunciation when they really have a non-obvious pronunciation (thus leading people who don't know IPA to learn an incorrect pronunciation)? It was more out of curiosity -- doesn't matter anyway if we put the audio pronunciation next to the IPA. 😉

@ohare93
Copy link
Member

ohare93 commented Apr 29, 2019

Ahh I see. The only one I can think of that would confuse English speakers is "j" is pronounced like a y 🤔 The rest of them are too strange ʃ ð θ ʔ, or are similar but with a twist like "ŋ" which sounds like the "ng" in "ending".

@omar-selo
Copy link

I agree with @peterkrieg in that space shouldn't be an issue with modern phones, especially when each audio file will probably be very small. The first thing I think of when looking at a card is how should I pronounce it and I find listening to the pronunciation much easier than trying to decipher IPA characters. If some people still prefer smaller size over pronunciation why not just have an optional deck release of that deck.

@ohare93
Copy link
Member

ohare93 commented Jun 18, 2019

If it is just 2-3MB more then this is a no brainer 👍 11MB (the current size) may be classified as a large deck on Anki, but I find it hard to believe anyone would be hard pressed to find a few more MBs on their computer/phone/tablet. I do still think IPA can be useful, regardess.

@code-hunger
Copy link
Contributor

Are you all talking about having pronunciation files for every country name and capital?
I don't see a reason for having audios for more than 15-20% of the cards; most of them seem straightforward.
Only exceptional cases like the ones mentioned above are worth it IMO.

Another point - such rough estimates should not serve as a basis for the final decision. I'd suggest we make a list of candidates for audiosation/adding hints, and only then measure the impact on the deck.

And I'd vote for IPA hints on irregularly pronounced names, because Anki is not a home app. Its big plus is its fitness for the public open spaces - places where you can't listen unless you have headphones.

@peterkrieg
Copy link
Author

I agree that it wouldn't make sense to have pronunciations for every country / capital. 15-20% them seems reasonable. I'd be happy to draft up a potential list of starters (there are still plenty of challenging pronunciations).

I don't know the IPA but that does seem very useful to learn and I'd like to. I think that's a fine alternative, although admittedly a bit more visual clutter on each card. In my opinion, an audio pronunciation is perfect to use the full strengths of Anki - combining visual and audio to learn material. This is why the most effective language programs (for example, duolingo, rosetta stone, etc) combine audio with visuals when learning new vocabulary. I think an audio pronunciation would help strengthen the memorization of learning the capital / country.

That said, it wouldn't be easy to find audio pronunciation files for every capital/country of interest. Wikipedia has some, but not all, and varying in quality. Anyone else know of a good source?

@viivgit
Copy link

viivgit commented Jul 3, 2019

I would argue that sound makes more sense than IPA which can be hard to read. What is the point of having a reading in IPA that you can't read for a capital name that you already can't read...?
In most vocabulary decks on Anki there is audio because it is a crucial component of the learning process. I am definitely not against IPA per se, so it could be included too, but I am pointing out that sound makes more sense and should not be ruled out instead of IPA for sure.

As for the sounds files themselves maybe https://forvo.com can be of help, it is a database of sounds by native speakers pronouncing words in their own language, and most importantly it is licensed under the CC-BY-SA 3.0, so I think the sounds could be included here.

Final remark, as others before I think adding a few MB to the deck is really not a problem, when you look at some popular Japanese decks that are 700MB with audio and pictures. I had such a deck on a 2012 low-end smarthphone and it was totally fine. A couple MB are the size of a picture or a song so I don't see how it could be a problem. But if for some reason I did not foresee it is, the sounds could be added separately in a zip that one could add to the deck very easily (that is what the Japanese decks that I am talking about does).

Edit: I fixed two typos

@axelboc axelboc changed the title Country / Capital Prounciations Country / Capital pronunciation Jul 28, 2019
@aplaice
Copy link
Collaborator

aplaice commented Aug 6, 2019

If votes are wanted, I'm definitely in favour of both IPA and audio pronunciations for the trickiest cases!

Regarding forvo.com, unfortunately the sounds are licensed under CC BY-NC-SA. Depending on whether the Anki deck, as a whole, is treated as a derivative work (rather than just a "collection") of its constituent media (images and audio) this might or might not be a problem. (Disclaimer: IANAL)

If it is treated as a derivative work, then there is an issue, since this deck already contains images under CC BY-SA, which is incompatible with CC BY-NC-SA.

If it isn't treated as a derivative work, it should be OK (e.g. see here). The non-commercial clause in forvo's audio's license should also not be a problem, since the deck isn't being used commercially.

Edit: There's some more background here

Edit2: On reflection, I can imagine the boundary between derivative work and collection also being at an intermediary level, not just the two above extremes (e.g. an Anki card is a derivative work of its constituent parts, but an Anki deck is only a collection of cards; or: an Anki note is a derivative work of its constituent parts, but an Anki deck is only a collection of notes). Once I have time to formulate the question nicely, I'll ask at https://opensource.stackexchange.com/ where they might have better ideas.

Edit3

Upon further investigation, it seems my fears were overblown and it's highly unlikely that an Anki card would be considered an "adaptation" of any included audio. The most informative source I found was this question on stackexchange , and it's unlikely asking would produce anything better. The answer cites the (US) case of a CC BY-SA licensed image being used on the front cover of a book, where the court declared that neither the book itself, nor even the front cover as a whole were derivative works of the image (and hence neither had to be released under the CC BY-SA). On the specific topic of audio, these questions, are interesting, and come to the conclusion that including audio in a larger work don't make the larger work a derivative of the audio. This strongly suggests that the incompatibility between the CC BY-SA images and any potential CC BY-NC-SA audio, would not be an issue, in this case.

(Obviously, Stackexchange answers are not legal advice, but they're a reasonable resource.)

@Vages
Copy link
Collaborator

Vages commented Oct 1, 2019

This is a great idea as a separate deck or list, but I think it will become a burden on the project, both in the short and the long run.

Back of the envelope: This feature will make the deck 20–30 % more time-consuming to maintain while adding the same amount of value for perhaps 5 % of the users. Pronounciation data will be a burden to the remaining 95 % of remaining users as well as the maintainers. And here is why I think so:

First of all: Ultimate Geography should be an authoritative list of hard facts. Pronounciation is ambiguous: Even with sound files or IPA, do you pronounce things as natives would? Probably not. And even if you settle for English, which of the pronounciation variants do you choose? Pahki-stahn, Packy-stan … ?

Secondly, adding is easy, maintaining is harder. I think Anki decks could be considered software (although very simple pieces of software). And my hope is that the Ultimate Geography deck could live for 20 years. In computer programming, the best examples of long-lived software fall into two categories: Giant behemoths maintained by large, well-funded organizations (e.g. Microsoft Windows) or small, single-purpose programs, like Unix terminal scripts. Of the two, the latter category greatly outnumbers the first because small programs are inherently easier to maintain and can be re-used in unforeseen ways. And even better: The re-use does not interfere with how the original users use the program.

If I may use an allegory: Small programs are flowers; large progams are gardens. Gardens can exist, but they require a lot of work. By including pronounciations in this deck, the flower bouquet which is Ultimate Geography starts its expansion into a garden. Once we have included pronounciations, how can we say no to other equally interesting and reasonable requests: A country's top level domain, Heraldic description of the flag, its population, its area? Each of these will need to be maintained, translated and updated.

Mapping country and capital names to pronounciations will not suffer from being put in a a separate deck. It may even come to more use this way: As part of a collection of language training decks for those learning English as a second language, as an IPA training deck ... and many other ways that we cannot imagine.

@aplaice
Copy link
Collaborator

aplaice commented Oct 1, 2019

I fully agree that, in general, great care should be taken before adding more features. Thank you for bringing up the point and vividly expressing it!

My main disagreement is that pronunciations will, IMO, increase the value of the deck for most users. It seems logical and, based on a very cursory literature search, generally accepted in the field of education*, that "multi-sensory" learning helps improve retention. Hence, having pronunciations as part of the relevant cards (e.g. pronunciations of the capitals, or at least the harder-to-pronounce-ones, in the Countries → Capitals cards) will benefit not only those who deeply care about getting the pronunciation right, but everyone else, as well (provided they're not studying in a public place, without headphones...).

* I've seen it most memorably described in the context of learning foreign languages. Here (doi:10.1016/j.tics.2008.07.006) — the link goes to a non-paywalled copy of the paper is the first scholarly paper on the topic, that I found, now, and it's broadly in support of the idea.

Once we have included pronounciations, how can we say no to other equally interesting and reasonable requests

The main difference is that when learning the country/capital names you're (most probably — unless you completely avoid sub-vocalisation) already learning a pronunciation of the names.

FWIW, I think that adding pronunciations (if it's even given the go-ahead-card) should probably wait until #143 is resolved, though.

@ohare93
Copy link
Member

ohare93 commented Oct 2, 2019

Totally agree with @aplaice, pronunciations are useful for memorisation, and will overall enhance the deck. Though it is of course not a high priority right now.

@Vages I hear what you're saying, smaller more concise things are indeed easier to maintain. However I believe the maintenance will be minimal, the pronunciations will only change when the country/capital does. Especially if only some of the more difficult/confusing to pronounce countries are given pronunciation. There are plenty of ways to go about this addition.

First of all: Ultimate Geography should be an authoritative list of hard facts. Pronunciation is ambiguous:

What counts as a "Country" is ambiguous 😉 The inclusion of Hong Kong, Israel, or Palestine in the deck (as well as the exclusion of other various territories) is a matter of opinion. Not all is a hard fact, plenty is disputed, but we will still strive to be as close to truth as possible!

We must exercise some judgement in what is considered the general consensus and/or what is relevant for this deck. I believe that also applies to country/capital pronunciations, and such pronunciations have already been settled on in other places like Wikipedia/Wiktionary (though of course there are differences in dialect between UK/US and the like, we merely have to maintain consistency in our choices).

@viivgit
Copy link

viivgit commented Oct 3, 2019

I can't agree more with @aplaice , since it is indeed what I was referring to in my earlier comment: it is proven in many contexts that learning is more effective with multi-sensory/stimuli inputs, such as audio.
And while @Vages general comments about maintenance are founded, one has to remember that the deck is not just a list of 'hard facts' as you mention, but a deck to learn!
The goal is to remember these facts so you don't need the deck in the end, so anything that will improve this helps in achieving the goal of this deck. Hence adding the pronunciation is not on par as other improvement such as adding other information to the cards like population, area, top level domain etc., which add information to be remembered, and yes on the point of view of maintenance, these items would have to be checked regularly.
Finally even with respect to the other causes for concerns that were which pronunciation to use, and maintenance of these audio files, as @ohare93 commented, there is a standard for pronunciation we can use (e.g. Wikipedia) and it is set and does not change, unless the capital changes which is rare, so maintenance will not be a problem once the files are added.

@mighty-cthulhu
Copy link

I am strongly against adding audio to this deck. I have a lot of experience using anki for learning languages. I agree that audio is useful for learning languages. But only if it comes in the accent that you want to learn. Additionally, if only a few cards have audio it really interrupts your flow when suddenly one of the cards "speaks". Another consideration is that whenever I have to wait in public places I only pick silent decks to practice while I wait. I really wouldn't want my go-to deck to be "spoiled" in this way.

However, when I first started learning Ultimate Geography deck several years ago, pronunciation was something that I felt was missing. So I added IPA to the names of the countries and capitals that I was having trouble with. Since I'm not a native speaker of English, it was definitely more than 20% that everyone here is talking about. Some of the names that seemed straightforward, like "Cockburn Town" were definitely a surprise (/ˈkoʊbərn/) - I'm glad I decided to double-check its pronunciation.

IPA is very straightforward and useful, and if you don't know it yet, look up "IPA for English" - it'll take about 5 minutes to learn. I would vote for adding IPA, because it is non-intrusive, efficient and silent. You can just ignore it if you don't want it.

It don't think it would be difficult to maintain - how often do the names of the countries and capitals change after all? The problem is which pronunciation to choose. For me it would be American accent. But then there are still choices, like for example /ɪˈræk/, /ɪˈrɑːk/, /aɪˈræk/ for Iraq. It's counter-productive to list all of them.

@omar-selo
Copy link

Reading through the comments there seems to be a disagreement on adding audio pronunciations. That said it seems to me everyone agrees that IPAs could help and in the very least no one is opposed to adding them. So regardless of whether we add audio pronunciations or not, how about we add IPAs for now?

@axelboc
Copy link
Collaborator

axelboc commented Nov 23, 2019

If we go ahead with IPAs, here are some questions remaining:

  1. Do we add IPAs to every country and capital in the deck, or only to a select few?
  2. If we add them only to a select few, how to we decide which ones?
  3. Are IPAs needed in every language?
  4. When multiple pronunciations are available due to accents, which one do we choose?
  5. Do we add the IPAs to the Country info and Capital info fields or do we create new fields (potentially in each language)?

@mighty-cthulhu
Copy link

mighty-cthulhu commented Nov 23, 2019

Here is my take on this:

  1. For English - yes, why not. It's easier to just add IPAs to everything than debate the list of a "select few". (Are you sure you know how to pronounce Saint Helena? It's /həˈliːnə/)
  2. see 1.
  3. No. Many languages are phonetic - e.g. Spanish, they do not need transcription. English is not one of them.
  4. That's a tricky one. Personally I vote for a General American accent.
  5. I added my IPAs right after the names in the Country and Capital fields, so that I could always see them whenever I see the names of the respective Country or Capital.

@Vages
Copy link
Collaborator

Vages commented Nov 26, 2019

I think the problem of choosing the "right accent" is the best argument for having this as a separate deck. Then each user would be able to choose the accent they want to use.

@viivgit
Copy link

viivgit commented Jan 2, 2020

I don't really understand the point of @mighty-cthulhu about the problem of sound when in public. I use vocab decks with sounds in public often, and if I just turn the volume off...it takes one second.

With respect tot the last answer of @mighty-cthulhu, if IPA is added it definitely has to be in another field so one can decide to display it or not. If it is in merged in the Country and Capital fields, one would have to parse that out to remove the info from the card. This is because it would go against any standard database implementation rules, that states that you have to separate information of different nature into different fields.

I strongly disagree from experience that "it just takes 5 mins" to learn IPA and its subtleties, and it may look very confusing at first for someone new to the deck. Many people have never even seen these symbols.

I would argue that if it is added, it even needs to be masked on the default template that 99% of users will end up using, but that can be debated. Advanced users like the ones in this thread would know how to display it if they want to.

I still support the addition of audio to this deck, through the ones available in forvo.com for all the reasons stated previously by different users.

@mighty-cthulhu
Copy link

mighty-cthulhu commented Jan 3, 2020

I don't really understand the point of @mighty-cthulhu about the problem of sound when in public. I use vocab decks with sounds in public often, and if I just turn the volume off...it takes one second.

You may not understand it, but it doesn't mean it's not a problem for people. And when the volume is turned off, pronunciation info is gone, too. Oh, and don't forget to turn the volume back on after you're done with your anki session.

I strongly disagree from experience that "it just takes 5 mins" to learn IPA and its subtleties

One doesn't have to learn the entire IPA, just IPA for English. I didn't notice any subtleties there. Here is an example: IPA for English.

I still support the addition of audio to this deck, through the ones available in forvo.com

Which accent do you have in mind? Also many words are absent from forvo. I just checked the first one that came to mind - Kralendijk - and it doesn't have an audio in English there at all.

--

I don't see any advantages of adding audio over IPA, other than some people's unwillingness to invest a bit of time to take a look at IPA for English.

IPA is a simple text - it's easy to maintain, it doesn't depend on availability of audio files on the internet, the field can list an alternative pronunciation if needed, it barely takes any extra space, and it's much easier to ignore than audio for those names that you already know how to pronounce.

@ukanuk
Copy link
Contributor

ukanuk commented Jan 5, 2020

Even just adding IPA is not so simple if some words have multiple pronunciations. Look at https://en.wikipedia.org/wiki/Chișinău for example, it has /ˌkɪʃɪˈnaʊ/ KISH-ih-NOW, also US: /ˌkiːʃiːˈnaʊ/ KEE-shee-NOW, Romanian: [kiʃiˈnəw]. That looks like three different IPA pronunciations, and adding all three is quite a bit of information most people wouldn't use.

On other decks of mine I've really enjoyed adding reference hyperlinks to the back of the cards, which I can click when I want more info. Why not add a Wikipedia and/or Forvo.com hyperlink to the answer side of each card? This has the drawback of only working for people currently connected to the internet, but the advantage of significantly more available supplementary information which may even be region-specific (i.e. the German deck could link to de.wikipedia.org rather than en.wikipedia.org), and people could listen to pronunciations in various accents rather than whatever happens to be bundled with Ultimate Geography.

FYI, I only just downloaded this deck and am starting to learn, so please forgive me if this is breaking some cardinal rule of the Ultimate Geography community!

Here's an example of what the back of a Country > Capital card could look like:

image

Back Template:

<div class="value value--top">{{Country}}<a href="https://forvo.com/word/{{Country}}/#en" style="text-decoration: none; font-size: 70%;"> (🔊<span style="text-decoration: underline; ">listen</span>)</a></div>
{{#Country info}}<div class="info">{{Country info}}</div>{{/Country info}}

<hr id=answer>

<div class="type">Capital</div>
<div class="value">{{Capital}}<a href="https://forvo.com/word/{{Capital}}/#en" style="text-decoration: none; font-size: 70%;"> (🔊<span style="text-decoration: underline; ">listen</span>)</a></div>
{{#Capital info}}<div class="info">{{Capital info}}</div>{{/Capital info}}

<div class="info">See Wikipedia page for <a href="https://www.wikipedia.org/wiki/Special:Search?search={{Capital}}">{{Capital}}</a> or <a href="https://www.wikipedia.org/wiki/Special:Search?search={{Country}}">{{Country}}</a></div>

@mighty-cthulhu
Copy link

mighty-cthulhu commented Jan 5, 2020

Look at https://en.wikipedia.org/wiki/Chișinău for example, it has /ˌkɪʃɪˈnaʊ/ KISH-ih-NOW, also US: /ˌkiːʃiːˈnaʊ/ KEE-shee-NOW, Romanian: [kiʃiˈnəw]. That looks like three different IPA pronunciations

In this example /ˌkɪʃɪˈnaʊ/ would be used. The second one is an alternative pronunciation used only in the US, and the third one is how it sounds in Romanian, which we do not need. But yes, there are names that have multiple pronunciations, for example /ɪˈræk/, /ɪˈrɑːk/, /aɪˈræk/ for Iraq - which is true regardless of whether you use IPA or audio.

By the way, accents wouldn't matter that much with IPA. For many words that have the same IPA, in audio you can tell if the speaker is, say, British or American.

Why not add a Wikipedia and/or Forvo.com hyperlink to the answer side of each card?

Pronunciation-wise, not every Wikipedia entry will have audio or even IPA, and there are words that are missing from Forvo, too. As for "more info" - it would clutter the cards more than it would be useful. Personally, I don't think I would ever click them even at times when I have internet connection, which I usually don't.

Speaking from many years of experience using Anki: studying the cards has a rhythm answer-next-answer-next... If you want to keep up you won't have time to "listen to pronunciations in various accents" or read more info.

@ohare93
Copy link
Member

ohare93 commented Jan 14, 2020

@ukanuk Agreed! Apart from...

US English over other regions

I simply cannot stand some American pronunciations of certain countries, like Qatar sounding like /ˈkəːtər/. I have this nagging memory of @axelboc saying that British English was the default in some context, but I cannot recall where or find that conversation.

That being said, should the options be no IPA or American IPA I would not stand in the way if others got use out of it 😉 I'd probably just make my own fixed fork, lol.

@aplaice
Copy link
Collaborator

aplaice commented Jan 14, 2020

I simply cannot stand some American pronunciations of certain countries, like Qatar sounding like /ˈkəːtər/. I have this nagging memory of @axelboc saying that British English was the default in some context, but I cannot recall where or find that conversation.

To be honest, I'm allergic to some US pronunciation as well, though I accept that people speaking US English probably constitute a majority of native English speakers. That said, for spelling at least, anki-ultimate-geography has indeed standardised on British English, as @ohare93 pointed out.

@ukanuk
Copy link
Contributor

ukanuk commented Jan 14, 2020

Standardizing on British spelling is unlikely to cause any controversy since basically everyone except the USA uses them, so it's an even split who'd want what. But British pronunciations aren't so easy to accept, since Australians, Canadians, and every other English-speaking country each have different accents and pronunciations.

I don't think it particularly matters anyway though, as I haven't seen any countries yet with anything besides US pronunciations listed. Moreover, phonemic IPA pronunciations are supposed to let people say the same word in their own accent, so ideally all countries actually have that type already which should reduce conflict?

Also note, anyone feeling that strongly about the pronunciation of Qatar or any other country can just make the necessary edits to Wiktionary so it's chosen by our final criteria. I personally prefer pronunciations closer to the native one, like /ˈkɑːtər/ from https://www.washingtonpost.com/video/politics/how-do-you-say-qatar-senate-hearing-has-the-answer/2014/06/12/57b193aa-f240-11e3-8658-4dc6c63456f1_video.html, which I found on the Wikipedia page, now let's see who can edit the fastest... 😂

@aplaice
Copy link
Collaborator

aplaice commented Jan 14, 2020

Moreover, phonemic IPA pronunciations are supposed to let people say the same word in their own accent, so ideally all countries actually have that type already which should reduce conflict?

As far as I'm aware, it's not quite that simple — it is sometimes the case that the phonemic representations of the pronunciations of the words are also different in different accents (and not just the phonetic representations, which are frequently different). For instance, see the word "far". I don't know whether there are such cases for the pronunciations of country and capital names, though, so it might not matter for this deck.

Edit: For a case where a country or capital name has a different US and UK phonemic pronunciation, see Edinburgh.

@ukanuk
Copy link
Contributor

ukanuk commented Jan 15, 2020

Thanks for the example, and good point about it not being so simple. I saw this in the Wiktionary Pronunciation draft guideline as well, but forgot about it:

By contrast, phonemic transcriptions, given within slashes, indicate the sounds of the headword in a mostly dialect-neutral way using phonemes for a particular language. Phonemically, the most significant accent groups are rhotic and non-rhotic. Most English terms have only one phonemic transcription. For example, the standard US pronunciation of law usually has a short [ɑ] sound while the standard UK pronunciation nearly always has a long [ɔː] sound, but neither dialect distinguishes phonemically between long [ɔː] or [ɑː] and short [ɔ] or [ɑ], and US [ɑ] is a predictable reflex of UK [ɔː]. So, the only phonemic transcription given is /lɔː/, optionally supplemented by phonetic transcriptions to show details of regional variation like vowel length.

It then goes on to detail the {{a|rhotic}}, {{a|non-rhotic}}, {{a|bad-lad-split}}, and {{a|bad-lad-merger}} accent tags which can be used to indicate the accent if it does matter for that particular word. It provides "free" and "pin" as words which are the same across accents, and "better" and "bird" as words which have accent variation (note the "r" in the rhotic pronunciations versus ":" in non-rhotic).

free: IPA(key): /ˈfɹiː/
pin: IPA(key): /ˈpɪn/
better: (rhotic) IPA(key): /ˈbɛtəɹ/, bird: (rhotic) IPA(key): /ˈbɜɹd/
better: (non-rhotic) IPA(key): /ˈbɛtə/, bird: (non-rhotic) IPA(key): /ˈbɜːd/

@ScottON
Copy link

ScottON commented Apr 22, 2020

Why not use Google WaveNet TTS? The wavenet voices are much better sounding than the standard voice. They sound very human.

I recently used it to generate about 6000 audio files of words for another deck and it's a grand total of 23.6mb - with phone storage as it is today that is insignificant from a memory perspective.

Regarding accent I'd suggest British English because it's closer to the standard English accent around the world. More countries have ties going back to English rule than American.

I'm aware of the risks of TTS but every country that I just tested was pronounced correctly - I sampled a handful at random. It's possible some niche countries wouldn't be handled correctly. Alternatively you could set the TTS to a voice from each country to get the pronunciation used by natives.

@ukanuk
Copy link
Contributor

ukanuk commented Apr 22, 2020

I think the general consensus has been to add an IPA field(s) once more compelling reasons exist to make a major revision to the deck. To attempt to summarize what has been said previously:

  • Adding pronunciations
    • Requires a major version revision because the pronunciation info properly belongs in a new field(s)
    • British English and American English proponents are guessed to be evenly split. At the end of the day, no one is likely to argue much one way or the other, and it's likely that many countries will not have both pronunciations available in IPA anyway.
  • Some have strong opposition to adding audio pronunciations
    • Entire extended deck is currently only ~13MB, and several users are quite concerned about minimizing space use e.g. for people with older Android phones with only 8GB storage and no expandable storage.
    • Audio pronunciations are especially accent-dependent, meaning they're not very general
    • High-quality pronunciations are already available for many places on Wikipedia, Wiktionary, and forvo.com, and for some countries could be generated with TTS if it were double-checked to match the IPA.
    • The main concerns are not about sourcing audio, but rather whether audio is really useful enough to a significant majority of the community
  • IPA text pronunciations have little opposition
    • Shows pronunciation mostly independent of accents (besides rhotic/non-rhotic differences in some cases, but e.g. British and Australian accents are written identically in IPA). If there's contention about which pronunciation is best for a particular country, text allows both options to be presented concisely.
    • Works everywhere, even in settings where audio is unacceptable/inaudible (e.g. in public) and is thus muted
    • Adds trivial amount of space to deck
    • For Country/Capital cards, both pronunciations appear seamlessly. With audio, both pronunciations are more difficult to present seamlessly
    • Primary opposition is that people don't know how to read IPA - the response is that one needn't know all of IPA, just the letters for your particular accent. This is mostly intuitive and it's easy to learn the few gotchas.

@ukanuk
Copy link
Contributor

ukanuk commented May 7, 2020

I initially assumed note model changes require a major revision. However, this may not actually be the case.

Per discussion in #306, CrowdAnki updates notes based on guid, independent of the note model. So even if note model changes, CrowdAnki still ought to be able to update everything properly. According to CONTRIBUTING.md Maintainer's Guide:

A change is considered major when users are likely to lose a significant part of their progress when upgrading the deck with CrowdAnki

So while Anki itself does not support importing apks to update notes with a new note, CrowdAnki does support it. And the current contributing guidelines limit major revisions to changes unsupported by CrowdAnki, not Anki itself.

And I assume that even if users tried updating the deck with an apkg in anki directly, they still wouldn't lose any progress, they'd just get a bunch of duplicate cards.

Does this mean we can start integrating pronunciations? I haven't personally tested any of my assumptions above, so if someone wanted to take time to clarify that it could be nice. Also, I'm curious whether apkg users could manually update their current deck's note model before importing the new apkg, and if that would cause notes to be updated rather than duplicated.

@aplaice
Copy link
Collaborator

aplaice commented May 7, 2020

The major issue regarding adding fields was (I think) the problem of making data.csv even more unwieldy, for a controversial change. Obviously, that's not a hard blocker, though.

Also, I'm curious whether apkg users could manually update their current deck's note model before importing the new apkg

That might be tricky to get exactly right (even if it might in principle work) — it'd be easier for them to just switch to using CrowdAnki. ("Migrating" an existing, 3.x deck to CrowdAnki does actually work, though in case somebody reading this wants to try it "live", I do recommend ensuring you have a back-up, just in case.)

@axelboc axelboc added better-deck-manager Improvements feasible with a better deck manager and removed votes wanted labels Jun 21, 2020
@axelboc
Copy link
Collaborator

axelboc commented Jun 21, 2020

Thank you all for chiming in and sharing your needs and opinions! 🙌 I've skimmed through this very long thread once again to try to identify a way forward.

Takeaways

  • I agree, @ukanuk, the consensus is clearly that adding pronunciation in some form would be beneficial to most users, even if in varying amounts (e.g. people who don't know IPA would still get useful hints from it).
  • I think everyone also agrees that pronunciations don't need to be added to all countries and capitals. This should reduce the amount of work needed to source, add and maintain the pronunciations. It may make it a bit tricky to decide which country/capital needs pronunciation, but I'd argue that common sense can easily prevail here.
  • People had strong opinions about adding IPA vs audio, but nobody seems to be against adding both. To clarify, we're talking about adding audio as a link -- the audio would not auto-play. Since we'll be adding pronunciation to a limited number of entries anyway, I don't think file size will be a concern. Wikipedia and Forvo audio files seem to weigh around 10 kB each, so if we add one to 300 cards (a high estimate, IMO), we'll be increasing the size of the deck by only 3 MB, which is very little. That being said, I think it would be a reasonable compromise from a maintenance standpoint to link directly to audio files on Forvo (or whatever), thus requiring users to have Internet access to play them.

Show stopper ... for now

We could probably come up with rules to decide which IPA(s)/audio pronunciation(s) to include, but it will only ever be a compromise -- some people will remain less happy than others. We've talked about US vs British English, but that's just the tip of the iceberg -- French vs Canadian French is another big one, for instance.

The fact is: locales matter. To me, this is a show stopper for the time being, at least until we move to Brain Brew, our future deck manager, which will help us to better manage translations (cf. #143).

I'm actually hoping that Brain Brew will eventually allow us to add as many localised fields as we want -- so instead of IPA:en, we'll have IPA:en-GB, IPA:en-US, IPA:en-AU, etc. and people will be free to build the deck in any locale they choose.

Granted, adding so many locales will be quite the maintenance burden, but I'm sure we'll find a way to fall back to one locale (en-GB, fr-FR, etc.) so we only have to provide IPAs when they differ. When it comes to audio pronunciation, I'm sure we can come up with a way to automate sourcing and maintenance, especially if we point to online audio files.


I've added a label called better-deck-manager to indicate that this issue is blocked until Brain Brew comes along and can manage locales. I hope this is okay with everyone and that you can all wait a bit longer... The future is bright, my friends! 🎉

@mighty-cthulhu
Copy link

nobody seems to be against adding both

I commented above about my reasons against adding audio, therefore I count as someone who is against adding both.

In any case, cutting out audio would be the first thing I do after importing the deck, so could you please put IPA and audio in different fields?

@aplaice
Copy link
Collaborator

aplaice commented Jun 21, 2020

@mighty-cthulhu that's the idea! (Or rather, the new, improved deck manager will mean that you'll be able to choose a version of the deck without the audio in the first place!)

(AFAICT it makes sense to keep the IPA and audio files in separate fields even apart from concerns like yours.)

@axelboc
Copy link
Collaborator

axelboc commented Jun 21, 2020

@mighty-cthulhu, sorry I missed your earlier comment. From what I can gather, you'd be against audio if it auto-played or if it wasn't in the accent you're interested in.

  • As mentioned, the accent issue will be solved with the new deck manager as we'll be able to add as many "localised" fields as we want to support audio pronunciations in any accents.
  • Auto-playing audio is out of the question. It's just not happening for all the very valid reasons you mentioned! 😄 Audio pronunciations will most likely be added as links next to the IPA; clicking the link will play the sound. At least that's how I see it.

@axelboc axelboc removed the better-deck-manager Improvements feasible with a better deck manager label Jan 16, 2021
@ndbroadbent
Copy link

ndbroadbent commented May 23, 2021

Hi everyone, I'm also very interested in learning how to pronounce countries and capitals. I'm a web developer, so I've enjoyed playing around with the card templates. Here's what I've done so far:

The first thing is that Anki supports TTS (text to speech), which uses the TTS feature provided by your operating system: https://docs.ankiweb.net/templates/fields.html#text-to-speech
This isn't perfect and it often struggles (e.g. with Sri Jayawardenepura Kotte), but I found that it works ok 80% of the time. The benefit is that it's very fast since you can click the icon and it plays instantly. If I'm not sure then I will check with Forvo as well.

So all you need to do is add a line like this: {{tts en_US voices=Apple_Samantha:Capital}} (on Mac OS), and an audio player widget will show up. (Then go into the deck options and turn off "Automatically play audio", because I found that to be pretty annoying.)

Screen Shot 2021-05-23 at 12 31 05 PM

I also added some code to generate links for Forvo and Google:

Screen Shot 2021-05-23 at 12 24 49 PM

Clicking them will open the links in your browser. I needed to use some JavaScript to encode the strings properly for URLs.

<div id=answer class="value value--top question">{{Country}} <span class="tts-widget">{{tts en_US voices=Apple_Samantha:Country}}</span></div>
{{#Country info}}<div class="info">{{Country info}}</div>{{/Country info}}
<div class="pronunciation country">🔊 <a href="#" class="pronounce forvo">Forvo</a> | <a href="#" class="pronounce google">Google</a></div>

<hr>

<div class="type">Capital</div>
<div class="value">{{Capital}} <span class="tts-widget">

</span></div>
<div class="pronunciation capital">🔊 <a href="#" class="pronounce forvo">Forvo</a> | <a href="#" class="pronounce google">Google</a></div>

{{#Capital hint}}<div class="info">Hint: {{Capital hint}}</div>{{/Capital hint}}
{{#Capital info}}<div class="info">{{Capital info}}</div>{{/Capital info}}

<script>
$('.pronunciation.country a.pronounce.forvo').attr('href', "https://forvo.com/word/" + encodeURIComponent("{{Country}}") + "/#en")
$('.pronunciation.capital a.pronounce.forvo').attr('href', "https://forvo.com/word/" + encodeURIComponent("{{Capital}}") + "/#en")
$('.pronunciation.country a.pronounce.google').attr('href', "https://www.google.com/search?q=pronounce+" + encodeURIComponent("{{Country}}"))
$('.pronunciation.capital a.pronounce.google').attr('href', "https://www.google.com/search?q=pronounce+" + encodeURIComponent("{{Capital}}"))
</script>

Some styles I use:

.pronunciation {
  margin-top: 3px;
  margin-bottom: 18px;
  font-size: 12px;
}

/* TTS icon is too large on mobile */
.mobile .tts-widget {
	zoom: 0.5;
  vertical-align: middle;
}

Another thing I experimented with is using the Forvo API to embed an online MP3 player directly in the card:

Screen Shot 2021-05-23 at 12 27 19 PM

Downsides:

IPA would be handy as well - I should learn how to read that! (Maybe I'll do this shared deck: https://ankiweb.net/shared/info/1879601353)

In summary, I think some support for pronunciations would be great in this shared deck. I think it would be helpful to add a new field for IPA, and then maybe a few links to Forvo, Google, and Wikipedia. I think most people would appreciate that.


UPDATE: I decided to try out the Forvo API, so I paid $12 for 6 months of access. Side note: Looks like Anki users are one of their target markets. (For learning languages.)

Screen Shot 2021-05-23 at 12 49 37 PM

API docs: https://api.forvo.com/documentation/word-pronunciations/

Couldn't get the AJAX requests to work, since they are crashing with an unknown error. Maybe something to do with CORS.

This code just shows an alert with : , error, undefined

  $.ajax({
    url: "https://apifree.forvo.com/key/************/format/json/action/word-pronunciations/word/Namibia/language/en",
    type: 'GET',
    success: function(data){
      alert(JSON.stringify(data));
    },
    error: function(xhr, ajaxOptions, thrownError) {
      alert(thrownError, xhr.statusText, xhr.responseText);
    }
  });

I was able to get the js-tags format working in an iframe. It's not too pretty, but it works! It's nice that I can click the little play arrow right inside the card.

Screen Shot 2021-05-23 at 1 38 43 PM

UPDATE: This only works when previewing the card templates in "Browse". For some reason the audio doesn't play when actually reviewing the cards. So scratch this for now, I don't think I can get the Forvo API to work in Anki.

Code for back template:

<div id=answer class="value value--top question">{{Country}} <span class="tts-widget">{{tts en_US voices=Apple_Samantha:Country}}</span></div>
{{#Country info}}<div class="info">{{Country info}}</div>{{/Country info}}
<div class="pronunciation country">🔊 <a href="#" class="pronounce forvo">Forvo</a> | <a href="#" class="pronounce google">Google</a></div>
<div class="pronunciation-iframe country"></div>

<hr>

<div class="type">Capital</div>
<div class="value">{{Capital}} <span class="tts-widget">{{tts en_US voices=Apple_Samantha:Capital}}</span></div>
<div class="pronunciation capital">🔊 <a href="#" class="pronounce forvo">Forvo</a> | <a href="#" class="pronounce google">Google</a></div>
<div class="pronunciation-iframe capital"></div>

{{#Capital hint}}<div class="info">Hint: {{Capital hint}}</div>{{/Capital hint}}
{{#Capital info}}<div class="info">{{Capital info}}</div>{{/Capital info}}

<script>
var countryEncoded = encodeURIComponent("{{Country}}");
var capitalEncoded = encodeURIComponent("{{Capital}}");

$('.pronunciation.country a.pronounce.forvo').attr('href', "https://forvo.com/word/" + countryEncoded + "/#en");
$('.pronunciation.capital a.pronounce.forvo').attr('href', "https://forvo.com/word/" + capitalEncoded + "/#en");
$('.pronunciation.country a.pronounce.google').attr('href', "https://www.google.com/search?q=pronounce+" + countryEncoded);
$('.pronunciation.capital a.pronounce.google').attr('href', "https://www.google.com/search?q=pronounce+" + capitalEncoded);

var forvoApiKey = "*****************";
var forvoURLCountry = "https://apifree.forvo.com/key/" + forvoApiKey + "/format/js-tag/action/word-pronunciations/word/" + countryEncoded + "/language/en";
var iframeElCountry = $('<iframe />', { src: forvoURLCountry, frameBorder: "0", height: 40 })
$(".pronunciation-iframe.country").html(iframeElCountry);

var forvoURLCapital = "https://apifree.forvo.com/key/" + forvoApiKey + "/format/js-tag/action/word-pronunciations/word/" + capitalEncoded + "/language/en";
var iframeElCapital = $('<iframe />', { src: forvoURLCapital, frameBorder: "0", height: 40 })
$(".pronunciation-iframe.capital").html(iframeElCapital);
</script>

Custom Styles:

.pronunciation {
  margin-top: 3px;
  margin-bottom: 18px;
  font-size: 12px;
}

.pronunciation-iframe, .pronunciation-iframe iframe {
	max-height: 40px;
}

/* TTS icon is too large on mobile */
.mobile .tts-widget {
	zoom: 0.5;
  vertical-align: middle;
}

@josealberto4444
Copy link
Collaborator

Just to add more information to what was already discussed (sorry for making the thread even longer), Spanish, as @mighty-cthulhu said, is phonetic, but not all capital names are adapted to Spanish, sadly. The worst case I've found (yet) was Tsjinval, which I had no idea of how to pronounce, so I looked it up in Wikipedia. Other examples are Oranjestad (which should be written Oranyestad according to our pronunciation, as we pronounce the letter j akin to the letter h in English), Port Louis (should have been adapted as Port Luis) or Windhoek (Wíndjuk).

The advantage that I see in Spanish is that these are very few exceptions and we have the option of clarifying it just by writing what I wrote in italics. However, I don't think that this is a good choice, if we go with IPA, IPA should be added in Spanish as well, in order to be consistent.

One last personal thought, I would not add non-free (like CC-BY-NC) resources to the deck. I personally like to promote open culture, and I try not to use anything which is not open culture unless I don't have any other option. I wouldn't do it even in the case of just linking, so I don't promote proprietary resources. I would check first, for every pronunciation needed, Wikimedia. In the case of Spanish, if we are lacking any, I commit to uploading it to Wikimedia. This is, of course, only my personal opinion. =)

@aplaice
Copy link
Collaborator

aplaice commented Nov 28, 2021

It seems that thanks to BrainBrew there's now a way forward for adding IPA and audio to the deck, at least theoretically. I'm discussing them separately, but they can be done independently or together.

IPA (straightforward)

  1. Add two new CSV files, say src/data/country_ipa.csv and src/data/capital_ipa.csv with fields guid,country_ipa,country_ipa:de,... or possibly guid,country_ipa:en,country_ipa:en-GB,country_ipa:en-US... etc.

    In the latter case, country_ipa:en (or country_ipa:fr/country_ipa:pt — I don't think we have other languages with major dialectal differences?) would be used when the phonemic (as opposed to phonetic) representation of the pronunciation was the same in all the dialects (and the en-GB,en-US... fields would be empty). If the representation were different, then that field would be empty and the country_ipa:en-GB,country_ipa:en-US... would be used.

    Perhaps the country_ipa:en-GB fields should be called country_ipa_localised:en-GB? (Otherwise, since we drop the :xx during BrainBrew transformations, in Anki we'd have a field name collision.) (I think it's necessary to have two country (and two capital) IPA fields (language-wide and dialect-specific) in Anki, rather than one (that'd combine both), since the Anki→CSV mapping would be ill-defined (one-to-two).)

  2. Create a new set of templates in src/note_models/templates/ — say Country - Capital (with IPA).csv etc. which would display the IPA field, and adapt the CSS.

    I think that it'd be best to, at least initially, keep the IPA-containing deck separate from the "main" and "extended" decks (i.e. create a third ("extended+IPA"?) "flavour"), which is why I'm suggesting a new set of templates.

    • Firstly, adding a new set of fields causes CrowdAnki to (rightly!) pop up a slightly scary dialog box, so we want to avoid that until we're confident that we've polished the IPA addition.

    • Secondly, I'm not 100% sure that we should include IPA in the "standard" decks out-of-the-box. (I'm leaning towards yes, but I'm not certain.)

  3. Update the BrainBrew recipes in recipes/. BrainBrew is definitely capable of all the needed transformations, though the YAML files will become pretty huge/messy.

Potential obstacles:

  1. The recipes or xx_ipa.csv files becoming unwieldy due to their number of fields or length (respectively)?

    I think they'll be manageable.

Audio (still problematic)

The same overall steps 1-3 (CSV files with appropriate contents, templates and recipes) as for IPA would still (likely) be needed.

There would, however, be some additional questions and issues:

  1. Are we including audio files or just "links" to audio that's downloaded and played "on demand".

  2. If we include audio files, how do we ensure that they're not auto-played? (A requirement discussed above.) (Probably doable.)

  3. If we include audio files, where do we get them from? (The same general question holds for "links", as well, though.)

    Wikimedia contains audio pronunciations for most countries, but AFAIK not for most capitals (even the "problematic" ones) (I've found this, which isn't very extensive). Forvo contains a larger number of pronununciations, but they're under CC BY-NC-SA which is non-free and hence, arguably, a blocker.

    Also, using Forvo "on-demand" (not pre-downloaded) is likely to be impossible without an API key, which we couldn't include in a shared deck.

    I'm not aware of any other sources that would allow redistribution even non-commercially.

    We could use machine-generated pronunciations, but they're still far from perfect. (e.g. see here, supposedly using Amazon TTS under-the-hood.)

  4. (Perfectionism issue) How do we ensure that the pronunciations are consistent with each other? (In the sense that our maps are now consistent in style with each other.)

3 is probably the greatest problem...

@ruin1990
Copy link
Contributor

ruin1990 commented Dec 29, 2021

Hi, can we use anki#tts feature ?
But this feature requires Anki 2.1.20, or AnkiMobile 2.0.56. AnkiDroid does not currently support this method.

@aplaice
Copy link
Collaborator

aplaice commented Dec 29, 2021

Hi, can we use anki#tts feature ?

We could, but the built-in OS TTS (which is what Anki would use) is most likely to fail in the cases where the pronunciation is most likely to be needed (unusual pronunciation — e.g. see Sri Jayawardenepura Kotte mentioned above), so I'm not sure if it's a net improvement.

@hendursaga
Copy link

@aplaice just a thought - what if, at least for some TTS software, we use the IPA pronunciation - just in case the TTS doesn't get it right itself - as input for that TTS? I know espeak-ng can take some form of IPA input, not sure about other popular TTS softwares..

@hendursaga
Copy link

Update: I don't think espeak-ng allows for IPA input using SSML just yet, but I'm sure some other offline TTS softwares do!

@aplaice
Copy link
Collaborator

aplaice commented May 26, 2023

@hendursaga Thanks for looking into this.

If we'd be just generating the audio "centrally", once, then we don't have to use a FOSS* or even an offline TTS engine. AFAIU the output of online TTS engines like Google Cloud TTS (or Azure etc.) is not copyrightable, so we could include such audio without license issues.

* a fully-FOSS stack would be nice, but especially for one-off-ish changes it's not a deal-breaker

Real-human pronunciations would be ideal, but in their absence good tts-generated audio is OK and is easier to make globally consistent.


Hi, can we use anki#tts feature ?
But this feature requires Anki 2.1.20, or AnkiMobile 2.0.56. AnkiDroid does not currently support this method.

It seems that tts is now supported on Ankidroid with some workarounds. However, I don't see anything in either docs (Anki or Ankidroid) suggesting that they support SSML (or IPA in any other way), so it's probably still not viable, as I don't trust the median built-in TTS engine to correctly deal with all unusual pronunciations. (Maybe some will handle it, well, but most won't.)

@axelboc
Copy link
Collaborator

axelboc commented Oct 4, 2023

Just came across this shared deck that enhances UG with English audio pronunciation for countries and capitals: https://ankiweb.net/shared/info/1878034191 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conception Scope of the deck, memorisation, contribution guidelines, etc.
Development

No branches or pull requests

17 participants