constants.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. """
  2. Defines constants used by autosub.
  3. """
  4. from __future__ import unicode_literals
  5. GOOGLE_SPEECH_API_KEY = "AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw"
  6. GOOGLE_SPEECH_API_URL = "http://www.google.com/speech-api/v2/recognize?client=chromium&lang={lang}&key={key}" # pylint: disable=line-too-long
  7. LANGUAGE_CODES = {
  8. 'af': 'Afrikaans',
  9. 'ar': 'Arabic',
  10. 'az': 'Azerbaijani',
  11. 'be': 'Belarusian',
  12. 'bg': 'Bulgarian',
  13. 'bn': 'Bengali',
  14. 'bs': 'Bosnian',
  15. 'ca': 'Catalan',
  16. 'ceb': 'Cebuano',
  17. 'cs': 'Czech',
  18. 'cy': 'Welsh',
  19. 'da': 'Danish',
  20. 'de': 'German',
  21. 'el': 'Greek',
  22. 'en-AU': 'English (Australia)',
  23. 'en-CA': 'English (Canada)',
  24. 'en-GB': 'English (United Kingdom)',
  25. 'en-IN': 'English (India)',
  26. 'en-IE': 'English (Ireland)',
  27. 'en-NZ': 'English (New Zealand)',
  28. 'en-PH': 'English (Philippines)',
  29. 'en-SG': 'English (Singapore)',
  30. 'en-US': 'English (United States)',
  31. 'eo': 'Esperanto',
  32. 'es-AR': 'Spanish (Argentina)',
  33. 'es-CL': 'Spanish (Chile)',
  34. 'es-ES': 'Spanish (Spain)',
  35. 'es-US': 'Spanish (United States)',
  36. 'es-MX': 'Spanish (Mexico)',
  37. 'es': 'Spanish',
  38. 'et': 'Estonian',
  39. 'eu': 'Basque',
  40. 'fa': 'Persian',
  41. 'fi': 'Finnish',
  42. 'fr': 'French',
  43. 'ga': 'Irish',
  44. 'gl': 'Galician',
  45. 'gu': 'Gujarati',
  46. 'ha': 'Hausa',
  47. 'hi': 'Hindi',
  48. 'hmn': 'Hmong',
  49. 'hr': 'Croatian',
  50. 'ht': 'Haitian Creole',
  51. 'hu': 'Hungarian',
  52. 'hy': 'Armenian',
  53. 'id': 'Indonesian',
  54. 'ig': 'Igbo',
  55. 'is': 'Icelandic',
  56. 'it': 'Italian',
  57. 'iw': 'Hebrew',
  58. 'ja': 'Japanese',
  59. 'jw': 'Javanese',
  60. 'ka': 'Georgian',
  61. 'kk': 'Kazakh',
  62. 'km': 'Khmer',
  63. 'kn': 'Kannada',
  64. 'ko': 'Korean',
  65. 'la': 'Latin',
  66. 'lo': 'Lao',
  67. 'lt': 'Lithuanian',
  68. 'lv': 'Latvian',
  69. 'mg': 'Malagasy',
  70. 'mi': 'Maori',
  71. 'mk': 'Macedonian',
  72. 'ml': 'Malayalam',
  73. 'mn': 'Mongolian',
  74. 'mr': 'Marathi',
  75. 'ms': 'Malay',
  76. 'mt': 'Maltese',
  77. 'my': 'Myanmar (Burmese)',
  78. 'ne': 'Nepali',
  79. 'nl': 'Dutch',
  80. 'no': 'Norwegian',
  81. 'ny': 'Chichewa',
  82. 'pa': 'Punjabi',
  83. 'pl': 'Polish',
  84. 'pt-BR': 'Portuguese (Brazil)',
  85. 'pt-PT': 'Portuguese (Portugal)',
  86. 'ro': 'Romanian',
  87. 'ru': 'Russian',
  88. 'si': 'Sinhala',
  89. 'sk': 'Slovak',
  90. 'sl': 'Slovenian',
  91. 'so': 'Somali',
  92. 'sq': 'Albanian',
  93. 'sr': 'Serbian',
  94. 'st': 'Sesotho',
  95. 'su': 'Sudanese',
  96. 'sv': 'Swedish',
  97. 'sw': 'Swahili',
  98. 'ta': 'Tamil',
  99. 'te': 'Telugu',
  100. 'tg': 'Tajik',
  101. 'th': 'Thai',
  102. 'tl': 'Filipino',
  103. 'tr': 'Turkish',
  104. 'uk': 'Ukrainian',
  105. 'ur': 'Urdu',
  106. 'uz': 'Uzbek',
  107. 'vi': 'Vietnamese',
  108. 'yi': 'Yiddish',
  109. 'yo': 'Yoruba',
  110. 'yue-Hant-HK': 'Cantonese, (Traditional HK)',
  111. 'zh': 'Chinese (Simplified, China)',
  112. 'zh-HK': 'Chinese (Simplified, Hong Kong)',
  113. 'zh-TW': 'Chinese (Traditional, Taiwan)',
  114. 'zu': 'Zulu',
  115. }