mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
compare only on rank, as voices may be subclassed
This commit is contained in:
parent
84711f8fe2
commit
5351a5f396
2 changed files with 3 additions and 2 deletions
|
@ -14,6 +14,7 @@ from concurrent.futures import Future
|
|||
from typing import Any, Callable, Dict, List, Optional, Tuple
|
||||
|
||||
import pyaudio
|
||||
from operator import itemgetter
|
||||
|
||||
import anki
|
||||
import aqt
|
||||
|
@ -169,7 +170,7 @@ class AVPlayer:
|
|||
if rank is not None:
|
||||
ranked.append((rank, p))
|
||||
|
||||
ranked.sort()
|
||||
ranked.sort(key=itemgetter(0))
|
||||
|
||||
if ranked:
|
||||
return ranked[-1][1]
|
||||
|
|
|
@ -9,7 +9,7 @@ or
|
|||
|
||||
{{tts ja_JP voices=Kyoko,Otoya,Another_name:Field}}
|
||||
|
||||
The first argument must be a language code.
|
||||
The first argument must be an underscored language code, eg en_US.
|
||||
|
||||
If provided, voices is a comma-separated list of one or more voices that
|
||||
the user would prefer. Spaces must not be included. Underscores will be
|
||||
|
|
Loading…
Reference in a new issue