Repository: oppia/oppia

Issue:
Audio tab is not available on my phone
I don't know why but I'm not able to access the audio tab. It's not visible on my phone.

<img src="https://user-images.githubusercontent.com/22103406/34683232-6b25491c-f4c7-11e7-8f8b-f17456dbd877.png" width="400">

Operating system - Android 6.0.1; Redmi 3S build/MMB29M
Chrome version - Chrome 63.0.3239.111


Discussion:
Hi @nithusha21 Can you please recheck?
@tjiang11 FYI
@Nix07 @tjiang11 just to check, is this addressed by #4436?
No, I still don't have access to audio tab on my phone.
Hi @Nix07 can you confirm that only auto-audio is not accessible(try playing [this](https://oppiatestserver.appspot.com/explore/zoaFi4YH6e8b)) 
Not sure why. Will take a look
  
Hi I did take a look at this. On phone, the audio codes for speech synthesis seems to be en_GB instead of en-GB (which is the check we have enforced). Shall I allow both language code styles for now? 
Wow, that's interesting -- and quite a surprising inconsistency. Thanks for finding that. Are these on Chrome for both desktop/mobile (and if so, what versions)?

Also, I defer to @tjiang11 on this; he should make the decision.
Yes Chrome desktop has 'en-GB' and chrome mobile has 'en_GB'. I changed our speechSynthesisAvailable check to check for both and then it works perfectly on mobile chrome. 

Chrome Desktop version - Version 63.0.3239.132 (Official Build) (64-bit) on Mac OS X
Chrome Mobile version - Version 63.0.3239.111 on Android 7.1.1 
Ah ok. What versions, though? Trying to understand whether this is a differing-versions issue, or a mobile-vs-desktop issue.
Edited the above with version numbers. 😅 
Ah ok, yeah, it's desktop vs mobile. Weird!

And yes, let's go ahead and submit a PR to change this as you described. Please send it to @tjiang11 for review. Thanks!
Sure will do. Thanks 👍 

Resolving patch:
diff --git a/core/domain/stats_jobs_one_off.py b/core/domain/stats_jobs_one_off.py
--- a/core/domain/stats_jobs_one_off.py
+++ b/core/domain/stats_jobs_one_off.py
@@ -21,10 +21,6 @@
 import copy
 import datetime
 
-import feconf
-import utils
-
-
 from core import jobs
 from core.domain import exp_domain
 from core.domain import exp_services
@@ -32,6 +28,8 @@
 from core.domain import stats_jobs_continuous
 from core.domain import stats_services
 from core.platform import models
+import feconf
+import utils
 
 (exp_models, stats_models,) = models.Registry.import_models([
     models.NAMES.exploration, models.NAMES.statistics


Test patch:
diff --git a/core/domain/collection_domain_test.py b/core/domain/collection_domain_test.py
--- a/core/domain/collection_domain_test.py
+++ b/core/domain/collection_domain_test.py
@@ -22,6 +22,7 @@
 import feconf
 import utils
 
+
 # Dictionary-like data structures within sample YAML must be formatted
 # alphabetically to match string equivalence with the YAML generation
 # methods tested below.
diff --git a/core/domain/stats_jobs_one_off_test.py b/core/domain/stats_jobs_one_off_test.py
--- a/core/domain/stats_jobs_one_off_test.py
+++ b/core/domain/stats_jobs_one_off_test.py
@@ -18,9 +18,6 @@
 
 import os
 
-import feconf
-import utils
-
 from core.domain import event_services
 from core.domain import exp_domain
 from core.domain import exp_services
@@ -30,7 +27,8 @@
 from core.platform import models
 from core.platform.taskqueue import gae_taskqueue_services as taskqueue_services
 from core.tests import test_utils
-
+import feconf
+import utils
 
 (exp_models, stats_models,) = models.Registry.import_models(
     [models.NAMES.exploration, models.NAMES.statistics])
diff --git a/scripts/build_test.py b/scripts/build_test.py
--- a/scripts/build_test.py
+++ b/scripts/build_test.py
@@ -18,6 +18,7 @@
 import build
 from core.tests import test_utils
 
+
 # pylint: enable=relative-import
 
 
diff --git a/utils_test.py b/utils_test.py
--- a/utils_test.py
+++ b/utils_test.py
@@ -22,6 +22,7 @@
 import feconf
 import utils
 
+
 # pylint: enable=relative-import