Skip to content

Commit

Permalink
0.0.15a
Browse files Browse the repository at this point in the history
- Improvements
- Updated README.md
  • Loading branch information
Sav22999 committed Jan 8, 2020
1 parent 6879056 commit 0fe14d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import java.util.*

class MainActivity : AppCompatActivity() {

private val translations_languages: Array<String> = arrayOf("en", "it", "sv") //change manually

private var firstRun = true
private val RECORD_REQUEST_CODE = 101
private var PRIVATE_MODE = 0
Expand Down Expand Up @@ -471,12 +473,17 @@ class MainActivity : AppCompatActivity() {
}

fun setLanguageUI() {
var lang = selectedLanguageVar.split("-")[0]
var restart = false
if (getString(R.string.language) != selectedLanguageVar) {
if (getString(R.string.language) != selectedLanguageVar && translations_languages.indexOf(lang) != -1) {
restart = true
}
else if (translations_languages.indexOf(lang) == -1 && getString(R.string.language) != "en") {
restart = true
lang = "en"
}
println("-->sel: " + selectedLanguageVar + " -->lang: " + getString(R.string.language))
var lang = selectedLanguageVar.split("-")[0]
println("-->index: " + translations_languages.indexOf(lang))
var locale: Locale = Locale(lang)
Locale.setDefault(locale)
var res: Resources = resources
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ _<u>**lang** is the short-name of your languages (e.g. Italian: it, English: en,

#### To do:

- **PRIORITY**: Create POST request to send the recording (Now it saves the audio on device, but I don’t know how to send the audio file to CV server)
- **PRIORITY**: Statistics "You” for Today (I don’t know how to get these information)
- **PRIORITY**: Create POST request to send the recording (Now it saves the audio on device, but I don’t know how to send the audio file to CV server) -> to do tests use voice.allizom.org instead of the main server.
- **PRIORITY**: Statistics "You” for Today (I don’t know how to get these information)
- Improve the loading of sentences/clips (download 5s per time, and when you are at the "4th” automatically download others)
- _IN PROGRESS_: Tutorial first-run for Listen and Speak section (just the first time you launch them)
- Change manually the UI language, when change from Settings/Tutorial
- Add option in Settings (toggle on/off) to play automatically the new clip after validation/skip in Listen section
- Add option in Settings (switch on/off) to play automatically the new clip after validation/skip (so after loading) in Listen section

### Screenshots

Expand Down

0 comments on commit 0fe14d2

Please sign in to comment.