exampleList;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_recordings);
+ Toolbar toolbar = findViewById(R.id.toolbarRecordings);
+ toolbar.setTitleTextColor(Color.WHITE);
+ setSupportActionBar(toolbar);
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ getSupportActionBar().setDisplayShowHomeEnabled(true);
+ audioList = findViewById(R.id.audio_list_view1);
+ mediaPlayer = new MediaPlayer();
+
+ String filesPath = getExternalFilesDir("/").getAbsolutePath();
+ File directory = new File(filesPath);
+ files = directory.listFiles();
+
+ exampleList = new ArrayList<>();
+
+ for (File file : files) {
+ exampleList.add(new ExampleRow(R.drawable.ic_baseline_play_circle_24, file.getName(), file));
+ }
+
+ audioListAdapter = new AudioListAdapter(this, exampleList);
+ audioList.setHasFixedSize(true);
+ audioList.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
+ audioList.setAdapter(audioListAdapter);
+
+ audioListAdapter.setOnItemClickListener(new AudioListAdapter.OnItemClickListener() {
+ @Override
+ public void onItemClick(int position) {
+ elementClick(exampleList.get(position), position);
+ audioListAdapter.notifyItemChanged(position);
+ }
+
+ @Override
+ public void onShareClick(int position) {
+ shareClick(exampleList.get(position));
+ }
+ });
+
+ }
+
+ public void elementClick(ExampleRow itemPlayed, int position) {
+ if (isPlaying && itemPlayed == thisFile) {
+ pauseAudio(itemPlayed);
+ } else {
+ if (isPlaying) {
+ int pos = 0;
+ for (ExampleRow element : exampleList) {
+ if (element.getImageButton() == R.drawable.ic_baseline_pause_circle_24) {
+ element.setImageButton(R.drawable.ic_baseline_play_circle_24);
+ audioListAdapter.notifyItemChanged(pos);
+ break;
+ }
+ pos++;
+ }
+
+ }
+
+ mediaPlayer.stop();
+ mediaPlayer.reset();
+ thisFile = itemPlayed;
+ itemPlayed.setImageButton(R.drawable.ic_baseline_pause_circle_24);
+ playAudio(itemPlayed, position);
+ }
+ }
+
+ private void pauseAudio(ExampleRow itemPlayed) {
+ paused = !paused;
+ if (paused) {
+ mediaPlayer.pause();
+ itemPlayed.setImageButton(R.drawable.ic_baseline_play_circle_24);
+ } else {
+ mediaPlayer.start();
+ itemPlayed.setImageButton(R.drawable.ic_baseline_pause_circle_24);
+ }
+ }
+
+
+ private void playAudio(ExampleRow itemPlayed, int position) {
+ try {
+ mediaPlayer.setDataSource(itemPlayed.getFile().getAbsolutePath());
+ mediaPlayer.prepare();
+ mediaPlayer.start();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
+ @Override
+ public void onCompletion(MediaPlayer mp) {
+ itemPlayed.setImageButton(R.drawable.ic_baseline_play_circle_24);
+ audioListAdapter.notifyItemChanged(position);
+ isPlaying = false;
+ }
+ });
+ isPlaying = true;
+ }
+
+ public void shareClick(ExampleRow currentItem) {
+ Intent shareIntent = new Intent();
+ shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ shareIntent.setAction(Intent.ACTION_SEND);
+ shareIntent.putExtra(Intent.EXTRA_STREAM, FileProvider.getUriForFile(this, this.getApplicationContext().getPackageName() + ".provider", currentItem.getFile()));
+ shareIntent.setType("audio/mp3");
+ startActivity(Intent.createChooser(shareIntent, getResources().getText(R.string.send_to)));
+ }
+
+}
+
diff --git a/Android_App/app/src/main/res/drawable-hdpi/ic_action_name.png b/Android_App/app/src/main/res/drawable-hdpi/ic_action_name.png
new file mode 100644
index 0000000..00fbe02
Binary files /dev/null and b/Android_App/app/src/main/res/drawable-hdpi/ic_action_name.png differ
diff --git a/Android_App/app/src/main/res/drawable-mdpi/ic_action_name.png b/Android_App/app/src/main/res/drawable-mdpi/ic_action_name.png
new file mode 100644
index 0000000..6787799
Binary files /dev/null and b/Android_App/app/src/main/res/drawable-mdpi/ic_action_name.png differ
diff --git a/Android_App/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Android_App/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..2b068d1
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/drawable-xhdpi/ic_action_name.png b/Android_App/app/src/main/res/drawable-xhdpi/ic_action_name.png
new file mode 100644
index 0000000..9f3a198
Binary files /dev/null and b/Android_App/app/src/main/res/drawable-xhdpi/ic_action_name.png differ
diff --git a/Android_App/app/src/main/res/drawable-xxhdpi/ic_action_name.png b/Android_App/app/src/main/res/drawable-xxhdpi/ic_action_name.png
new file mode 100644
index 0000000..f7f2bce
Binary files /dev/null and b/Android_App/app/src/main/res/drawable-xxhdpi/ic_action_name.png differ
diff --git a/Android_App/app/src/main/res/drawable-xxxhdpi/ic_action_name.png b/Android_App/app/src/main/res/drawable-xxxhdpi/ic_action_name.png
new file mode 100644
index 0000000..8f127bc
Binary files /dev/null and b/Android_App/app/src/main/res/drawable-xxxhdpi/ic_action_name.png differ
diff --git a/Android_App/app/src/main/res/drawable/button_state.xml b/Android_App/app/src/main/res/drawable/button_state.xml
new file mode 100644
index 0000000..8bc506b
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/button_state.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/drawable/ic_baseline_delete_24.xml b/Android_App/app/src/main/res/drawable/ic_baseline_delete_24.xml
new file mode 100644
index 0000000..282594c
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_baseline_delete_24.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_baseline_folder_24.xml b/Android_App/app/src/main/res/drawable/ic_baseline_folder_24.xml
new file mode 100644
index 0000000..dc6b080
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_baseline_folder_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_baseline_pause_circle_24.xml b/Android_App/app/src/main/res/drawable/ic_baseline_pause_circle_24.xml
new file mode 100644
index 0000000..9d9172b
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_baseline_pause_circle_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_baseline_play_circle_24.xml b/Android_App/app/src/main/res/drawable/ic_baseline_play_circle_24.xml
new file mode 100644
index 0000000..31814e2
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_baseline_play_circle_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_baseline_power_settings_new_24.xml b/Android_App/app/src/main/res/drawable/ic_baseline_power_settings_new_24.xml
new file mode 100644
index 0000000..7495b98
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_baseline_power_settings_new_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_baseline_select_all_24.xml b/Android_App/app/src/main/res/drawable/ic_baseline_select_all_24.xml
new file mode 100644
index 0000000..c70e5ac
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_baseline_select_all_24.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_baseline_settings_24.xml b/Android_App/app/src/main/res/drawable/ic_baseline_settings_24.xml
new file mode 100644
index 0000000..41a82ed
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_baseline_settings_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_baseline_share_24.xml b/Android_App/app/src/main/res/drawable/ic_baseline_share_24.xml
new file mode 100644
index 0000000..e502784
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_baseline_share_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_italy.xml b/Android_App/app/src/main/res/drawable/ic_italy.xml
new file mode 100644
index 0000000..65657ad
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_italy.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_launcher_background.xml b/Android_App/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..07d5da9
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/ic_united_kingdom.xml b/Android_App/app/src/main/res/drawable/ic_united_kingdom.xml
new file mode 100644
index 0000000..1e43614
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/ic_united_kingdom.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/play_button_default.xml b/Android_App/app/src/main/res/drawable/play_button_default.xml
new file mode 100644
index 0000000..05a2bab
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/play_button_default.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/play_button_focused.xml b/Android_App/app/src/main/res/drawable/play_button_focused.xml
new file mode 100644
index 0000000..f145eed
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/play_button_focused.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/Android_App/app/src/main/res/drawable/play_button_pressed.xml b/Android_App/app/src/main/res/drawable/play_button_pressed.xml
new file mode 100644
index 0000000..1ed447e
--- /dev/null
+++ b/Android_App/app/src/main/res/drawable/play_button_pressed.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/Android_App/app/src/main/res/font/maven_pro.xml b/Android_App/app/src/main/res/font/maven_pro.xml
new file mode 100644
index 0000000..c6a858f
--- /dev/null
+++ b/Android_App/app/src/main/res/font/maven_pro.xml
@@ -0,0 +1,7 @@
+
+
+
diff --git a/Android_App/app/src/main/res/layout/activity_main.xml b/Android_App/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..b9312cc
--- /dev/null
+++ b/Android_App/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/layout/activity_recordings.xml b/Android_App/app/src/main/res/layout/activity_recordings.xml
new file mode 100644
index 0000000..487af45
--- /dev/null
+++ b/Android_App/app/src/main/res/layout/activity_recordings.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/layout/example_row.xml b/Android_App/app/src/main/res/layout/example_row.xml
new file mode 100644
index 0000000..493720f
--- /dev/null
+++ b/Android_App/app/src/main/res/layout/example_row.xml
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/menu/menu.xml b/Android_App/app/src/main/res/menu/menu.xml
new file mode 100644
index 0000000..d35b126
--- /dev/null
+++ b/Android_App/app/src/main/res/menu/menu.xml
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/menu/menu_select.xml b/Android_App/app/src/main/res/menu/menu_select.xml
new file mode 100644
index 0000000..d6a41da
--- /dev/null
+++ b/Android_App/app/src/main/res/menu/menu_select.xml
@@ -0,0 +1,18 @@
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Android_App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..036d09b
--- /dev/null
+++ b/Android_App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Android_App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..036d09b
--- /dev/null
+++ b/Android_App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..180e337
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..0b5a39b
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..1008522
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..2e7b38e
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..a2a2a02
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..2691e62
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..a98752e
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..45c1ea6
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..05d2652
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..daf98bf
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..f02c72d
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..4bb11c9
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..76085f3
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..0b0f387
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..676aa9c
Binary files /dev/null and b/Android_App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/Android_App/app/src/main/res/values-night/themes.xml b/Android_App/app/src/main/res/values-night/themes.xml
new file mode 100644
index 0000000..203e219
--- /dev/null
+++ b/Android_App/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/values/colors.xml b/Android_App/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..f8c6127
--- /dev/null
+++ b/Android_App/app/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/values/dimens.xml b/Android_App/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..125df87
--- /dev/null
+++ b/Android_App/app/src/main/res/values/dimens.xml
@@ -0,0 +1,3 @@
+
+ 16dp
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/values/font_certs.xml b/Android_App/app/src/main/res/values/font_certs.xml
new file mode 100644
index 0000000..d2226ac
--- /dev/null
+++ b/Android_App/app/src/main/res/values/font_certs.xml
@@ -0,0 +1,17 @@
+
+
+
+ - @array/com_google_android_gms_fonts_certs_dev
+ - @array/com_google_android_gms_fonts_certs_prod
+
+
+ -
+ MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs=
+
+
+
+ -
+ MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
+
+
+
diff --git a/Android_App/app/src/main/res/values/ic_launcher_background.xml b/Android_App/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..4e823a0
--- /dev/null
+++ b/Android_App/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #3DDC84
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/values/preloaded_fonts.xml b/Android_App/app/src/main/res/values/preloaded_fonts.xml
new file mode 100644
index 0000000..1addd1b
--- /dev/null
+++ b/Android_App/app/src/main/res/values/preloaded_fonts.xml
@@ -0,0 +1,6 @@
+
+
+
+ - @font/maven_pro
+
+
diff --git a/Android_App/app/src/main/res/values/strings.xml b/Android_App/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..fec1ab9
--- /dev/null
+++ b/Android_App/app/src/main/res/values/strings.xml
@@ -0,0 +1,25 @@
+
+ Simsax voice
+ Write something...
+ Scrivi qualcosa...
+ play button
+ fuck off
+ Recordings
+ Settings
+ Exit
+ Navigation drawer open
+ Navigation drawer close
+ RecordingsActivity
+
+ First Fragment
+ Second Fragment
+ Next
+ Previous
+
+ Hello first fragment
+ Hello second fragment. Arg: %1$s
+ TextView
+ Send to...
+ ita button
+ eng button
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/values/themes.xml b/Android_App/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..d732590
--- /dev/null
+++ b/Android_App/app/src/main/res/values/themes.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+ `
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/main/res/xml/provider_paths.xml b/Android_App/app/src/main/res/xml/provider_paths.xml
new file mode 100644
index 0000000..4495c28
--- /dev/null
+++ b/Android_App/app/src/main/res/xml/provider_paths.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Android_App/app/src/test/java/com/android/simsax/ExampleUnitTest.java b/Android_App/app/src/test/java/com/android/simsax/ExampleUnitTest.java
new file mode 100644
index 0000000..35d0c7f
--- /dev/null
+++ b/Android_App/app/src/test/java/com/android/simsax/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.android.simsax;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/Android_App/build.gradle b/Android_App/build.gradle
new file mode 100644
index 0000000..dfbc7c1
--- /dev/null
+++ b/Android_App/build.gradle
@@ -0,0 +1,24 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ }
+ dependencies {
+ classpath "com.android.tools.build:gradle:4.1.2"
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
\ No newline at end of file
diff --git a/Android_App/gradle.properties b/Android_App/gradle.properties
new file mode 100644
index 0000000..52f5917
--- /dev/null
+++ b/Android_App/gradle.properties
@@ -0,0 +1,19 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app"s APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Automatically convert third-party libraries to use AndroidX
+android.enableJetifier=true
\ No newline at end of file
diff --git a/Android_App/gradle/wrapper/gradle-wrapper.jar b/Android_App/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/Android_App/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/Android_App/gradle/wrapper/gradle-wrapper.properties b/Android_App/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..487e2ee
--- /dev/null
+++ b/Android_App/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Thu Mar 04 23:06:07 CET 2021
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
diff --git a/Android_App/gradlew b/Android_App/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/Android_App/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/Android_App/gradlew.bat b/Android_App/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/Android_App/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/Android_App/settings.gradle b/Android_App/settings.gradle
new file mode 100644
index 0000000..5d601fc
--- /dev/null
+++ b/Android_App/settings.gradle
@@ -0,0 +1,2 @@
+include ':app'
+rootProject.name = "Simsax"
\ No newline at end of file
diff --git a/LJSpeech-1.1/transcript.csv b/LJSpeech-1.1/transcript.csv
new file mode 100644
index 0000000..080992f
--- /dev/null
+++ b/LJSpeech-1.1/transcript.csv
@@ -0,0 +1,201 @@
+parte_1_000|In this book, we've focused on the nuts and bolts of neural networks|In this book, we've focused on the nuts and bolts of neural networks;;;
+parte_1_001|how they work, and how they can be used to solve pattern recognition problems.|how they work, and how they can be used to solve pattern recognition problems.;;;
+parte_1_002|This is material with many immediate practical applications.|This is material with many immediate practical applications.;;;
+parte_1_003|But, of course, one reason for interest in neural nets|But, of course, one reason for interest in neural nets;;;
+parte_1_004|is the hope that one day they will go far beyond such basic pattern recognition problems.|is the hope that one day they will go far beyond such basic pattern recognition problems.;;;
+parte_1_005|Perhaps they, or some other approach based on digital computers,|Perhaps they, or some other approach based on digital computers,;;;
+parte_1_105|will eventually be used to build thinking machines, machines that match or surpass human intelligence|will eventually be used to build thinking machines, machines that match or surpass human intelligence;;;
+parte_1_006|This notion far exceeds the material discussed in the book - or what anyone in the world knows how to do.|This notion far exceeds the material discussed in the book - or what anyone in the world knows how to do.;;;
+parte_1_106|But it's fun to speculate.|But it's fun to speculate.;;;
+parte_1_007|There has been much debate about whether it's even possible for computers to match human intelligence.|There has been much debate about whether it's even possible for computers to match human intelligence.;;;
+parte_1_008|I'm not going to engage with that question.|I'm not going to engage with that question.;;;
+parte_1_108|Despite ongoing dispute, I believe it's not in serious doubt that an intelligent computer is possible|Despite ongoing dispute, I believe it's not in serious doubt that an intelligent computer is possible;;;
+parte_1_009|and perhaps far beyond current technology|and perhaps far beyond current technology;;;
+parte_1_010|and current naysayers will one day seem much more like the vitalists.|and current naysayers will one day seem much more like the vitalists.;;;
+parte_1_011|The idea that there is a truly simple algorithm for intelligence is a bold idea.|The idea that there is a truly simple algorithm for intelligence is a bold idea.;;;
+parte_1_111|It perhaps sounds too optimistic to be true.|It perhaps sounds too optimistic to be true.;;;
+parte_1_211|Many people have a strong intuitive sense that intelligence has considerable irreducible complexity.|Many people have a strong intuitive sense that intelligence has considerable irreducible complexity.;;;
+parte_1_012|They're so impressed by the amazing variety and flexibility of human thought|They're so impressed by the amazing variety and flexibility of human thought;;;
+parte_1_112|that they conclude that a simple algorithm for intelligence must be impossible.|that they conclude that a simple algorithm for intelligence must be impossible.;;;
+parte_1_212|Despite this intuition, I don't think it's wise to rush to judgement.|Despite this intuition, I don't think it's wise to rush to judgement.;;;
+parte_1_312|The history of science is filled with instances where a phenomenon initially appeared extremely complex,|The history of science is filled with instances where a phenomenon initially appeared extremely complex,;;;
+parte_1_412|but was later explained by some simple but powerful set of ideas.|but was later explained by some simple but powerful set of ideas.;;;
+parte_1_013|Consider, for example, the early days of astronomy.|Consider, for example, the early days of astronomy.;;;
+parte_1_014|Humans have known since ancient times that there is a menagerie of objects in the sky|Humans have known since ancient times that there is a menagerie of objects in the sky;;;
+parte_1_114|the sun, the moon, the planets, the comets, and the stars.|the sun, the moon, the planets, the comets, and the stars.;;;
+parte_1_214|These objects behave in very different ways|These objects behave in very different ways;;;
+parte_1_314|streak across the sky, and then disappear.|streak across the sky, and then disappear.;;;
+parte_1_015|But in the 17th century Newton formulated his theory of universal gravitation,|But in the seventeenth century Newton formulated his theory of universal gravitation,;;;
+parte_1_115|which not only explained all these motions, but also explained terrestrial phenomena|which not only explained all these motions, but also explained terrestrial phenomena;;;
+parte_1_016|The 16th century's foolish optimist seems in retrospect like a pessimist, asking for too little.|The sixteenth century's foolish optimist seems in retrospect like a pessimist, asking for too little.;;;
+parte_1_017|Of course, science contains many more such examples.|Of course, science contains many more such examples.;;;
+parte_1_018|Or the puzzle of how there is so much complexity and diversity in the biological world,|Or the puzzle of how there is so much complexity and diversity in the biological world,;;;
+parte_1_118|whose origin turns out to lie in the principle of evolution by natural selection.|whose origin turns out to lie in the principle of evolution by natural selection.;;;
+parte_1_218|These and many other examples suggest that it would not be wise to rule out a simple explanation of intelligence|These and many other examples suggest that it would not be wise to rule out a simple explanation of intelligence;;;
+parte_1_318|merely on the grounds that what our brains - currently the best examples of intelligence - are doing appears to be very complicated.|merely on the grounds that what our brains - currently the best examples of intelligence - are doing appears to be very complicated.;;;
+parte_2_000|Contrariwise, and despite these optimistic examples|Contrariwise, and despite these optimistic examples;;;
+parte_2_001|it is also logically possible that intelligence can only be explained|it is also logically possible that intelligence can only be explained;;;
+parte_2_100|by a large number of fundamentally distinct mechanisms|by a large number of fundamentally distinct mechanisms;;;
+parte_2_002|In the case of our brains, those many mechanisms may perhaps have evolved in response to many different selection|In the case of our brains, those many mechanisms may perhaps have evolved in response to many different selection;;;
+parte_2_102|in our species' evolutionary history.|in our species' evolutionary history.;;;
+parte_2_003|If this point of view is correct, then intelligence involves considerable irreducible complexity, and no simple algorithm for intelligence is possible.|If this point of view is correct, then intelligence involves considerable irreducible complexity, and no simple algorithm for intelligence is possible.;;;
+parte_2_004|Which of these two points of view is correct?|Which of these two points of view is correct?;;;
+parte_2_005|To get insight into this question, let's ask a closely related question,|To get insight into this question, let's ask a closely related question,;;;
+parte_2_105|which is whether there's a simple explanation of how human brains work.|which is whether there's a simple explanation of how human brains work.;;;
+parte_2_006|In particular, let's look at some ways of quantifying the complexity of the brain.|In particular, let's look at some ways of quantifying the complexity of the brain.;;;
+parte_2_007|Our first approach is the view of the brain from connectomics.|Our first approach is the view of the brain from connectomics.;;;
+parte_2_008|This is all about the raw wiring|This is all about the raw wiring;;;
+parte_2_009|how many neurons there are in the brain, how many glial cells, and how many connections there are between the neurons.|how many neurons there are in the brain, how many glial cells, and how many connections there are between the neurons.;;;
+parte_2_010|You've probably heard the numbers before|You've probably heard the numbers before;;;
+parte_2_110|the brain contains on the order of 100 billion neurons, 100 billion glial cells|the brain contains on the order of a hundred billion neurons, a hundred billion glial cells;;;
+parte_2_210|Those numbers are staggering. They're also intimidating.|Those numbers are staggering. They're also intimidating.;;;
+parte_2_012|There's a second, more optimistic point of view, the view of the brain from molecular biology.|There's a second, more optimistic point of view, the view of the brain from molecular biology.;;;
+parte_2_011|in order to understand how the brain works,|in order to understand how the brain works,;;;
+parte_2_111|then we're certainly not going to end up with a simple algorithm for intelligence.|then we're certainly not going to end up with a simple algorithm for intelligence.;;;
+parte_2_012|There's a second, more optimistic point of view, the view of the brain from molecular biology.|There's a second, more optimistic point of view, the view of the brain from molecular biology.;;;
+parte_2_013|The idea is to ask how much genetic information is needed to describe the brain's architecture.|The idea is to ask how much genetic information is needed to describe the brain's architecture.;;;
+parte_2_014|To get a handle on this question, we'll start by considering the genetic differences between humans and chimpanzees.|To get a handle on this question, we'll start by considering the genetic differences between humans and chimpanzees.;;;
+parte_2_016|This saying is sometimes varied - popular variations also give the number as 95 or 99 percent.|This saying is sometimes varied - popular variations also give the number as ninety-five or ninety-nine percent.;;;
+parte_2_017|The variations occur because the numbers were originally estimated by comparing samples of the human and chimp genomes,|The variations occur because the numbers were originally estimated by comparing samples of the human and chimp genomes,;;;
+parte_2_117|not the entire genomes.|not the entire genomes.;;;
+parte3_001|In the last few paragraphs I've ignored the fact that 125 million bits merely quantifies the genetic difference between human and chimp brains.|In the last few paragraphs I've ignored the fact that 125 million bits merely quantifies the genetic difference between human and chimp brains.;;;
+parte3_002|Not all of our brain function is due to those 125 million bits.|Not all of our brain function is due to those one twenty-five million bits.;;;
+parte3_003|Chimps are remarkable thinkers in their own right.|Chimps are remarkable thinkers in their own right.;;;
+parte3_004|Maybe the key to intelligence lies mostly in the mental abilities|Maybe the key to intelligence lies mostly in the mental abilities;;;
+parte3_104|and genetic information|and genetic information;;;
+parte3_005|If this is correct, then human brains might be just a minor upgrade to chimpanzee brains|If this is correct, then human brains might be just a minor upgrade to chimpanzee brains;;;
+parte3_105|at least in terms of the complexity of the underlying principles.|at least in terms of the complexity of the underlying principles.;;;
+parte3_006|Despite the conventional human chauvinism about our unique capabilities, this isn't inconceivable|Despite the conventional human chauvinism about our unique capabilities, this isn't inconceivable;;;
+parte3_106|the chimpanzee and human genetic lines diverged just 5 million years ago|the chimpanzee and human genetic lines diverged just five million years ago;;;
+parte3_206|a blink in evolutionary timescales.|a blink in evolutionary timescales.;;;
+parte3_010|in the absence of a more compelling argument, I'm sympathetic to the conventional human chauvinism|in the absence of a more compelling argument, I'm sympathetic to the conventional human chauvinism;;;
+parte3_110|my guess is that the most interesting principles|my guess is that the most interesting principles;;;
+parte3_210|underlying human thought|underlying human thought;;;
+parte3_310|lie in that 125 million bits|lie in that one twenty-five million bits;;;
+parte3_011|Adopting the view of the brain from molecular biology gave us a reduction of roughly nine orders of magnitude in the complexity of our description.|Adopting the view of the brain from molecular biology gave us a reduction of roughly nine orders of magnitude in the complexity of our description.;;;
+parte3_012|While encouraging, it doesn't tell us whether or not a truly simple algorithm for intelligence is possible.|While encouraging, it doesn't tell us whether or not a truly simple algorithm for intelligence is possible.;;;
+parte3_013|Can we get any further reductions in complexity?|Can we get any further reductions in complexity?;;;
+parte3_014|And, more to the point, can we settle the question of whether a simple algorithm for intelligence is possible?|And, more to the point, can we settle the question of whether a simple algorithm for intelligence is possible?;;;
+parte3_016|Among the evidence suggesting that there may be a simple algorithm for intelligence|Among the evidence suggesting that there may be a simple algorithm for intelligence;;;
+parte3_116|is an experiment reported in April 2000 in the journal Nature.| is an experiment reported in April two thousands in the journal Nature.;;;
+parte3_021|The visual cortex contains many orientation columns.|The visual cortex contains many orientation columns.;;;
+parte3_022|These are little slabs of neurons, each of which responds to visual stimuli from some particular direction.|These are little slabs of neurons, each of which responds to visual stimuli from some particular direction.;;;
+parte3_023|You can think of the orientation columns|You can think of the orientation columns;;;
+parte3_123|when someone shines a bright light from some particular direction, a corresponding orientation column is activated.|when someone shines a bright light from some particular direction, a corresponding orientation column is activated.;;;
+parte3_024|If the light is moved, a different orientation column is activated.|If the light is moved, a different orientation column is activated.;;;
+parte3_025|which charts how the orientation columns are laid out.|which charts how the orientation columns are laid out.;;;
+parte4_000|What the scientists found is that|What the scientists found is that;;;
+parte4_001|was rerouted to the auditory cortex,|was rerouted to the auditory cortex,;;;
+parte4_002|the auditory cortex changed.|the auditory cortex changed.;;;
+parte4_003|Orientation columns and an orientation map began to emerge in the auditory cortex.|Orientation columns and an orientation map began to emerge in the auditory cortex.;;;
+parte4_004|It was more disorderly than the orientation map usually found in the visual cortex,|It was more disorderly than the orientation map usually found in the visual cortex,;;;
+parte4_005|but unmistakably similar.|but unmistakably similar.;;;
+parte4_006|Furthermore, the scientists did some simple tests of how the ferrets responded to visual stimuli|Furthermore, the scientists did some simple tests of how the ferrets responded to visual stimuli;;;
+parte4_007|training them to respond differently when lights flashed from different directions.|training them to respond differently when lights flashed from different directions.;;;
+parte4_008|These tests suggested that the ferrets could still learn to "see",|These tests suggested that the ferrets could still learn to "see",;;;
+parte4_009|at least in a rudimentary fashion,|at least in a rudimentary fashion,;;;
+parte4_010|This is an astonishing result.|This is an astonishing result.;;;
+parte4_011|It suggests that there are common principles underlying how different parts of the brain|It suggests that there are common principles underlying how different parts of the brain;;;
+parte4_012|learn to respond to sensory data.|learn to respond to sensory data.;;;
+parte4_013|That commonality provides at least some support for the idea that there is a set of simple principles|That commonality provides at least some support for the idea that there is a set of simple principles;;;
+parte4_014|underlying intelligence. However, we shouldn't kid ourselves about how good the ferrets' vision was in these experiments.|underlying intelligence. However, we shouldn't kid ourselves about how good the ferrets' vision was in these experiments.;;;
+parte4_015|The behavioural tests tested only very gross aspects of vision.|The behavioural tests tested only very gross aspects of vision.;;;
+parte4_016|And, of course, we can't ask the ferrets if they've "learned to see".|And, of course, we can't ask the ferrets if they've "learned to see".;;;
+parte4_017|So the experiments don't prove that the rewired auditory cortex was giving the ferrets a high-fidelity visual experience.|So the experiments don't prove that the rewired auditory cortex was giving the ferrets a high-fidelity visual experience.;;;
+parte4_018|And so they provide only limited evidence in favour of the idea|And so they provide only limited evidence in favour of the idea;;;
+parte4_019|that common principles underlie how different parts of the brain learn.|that common principles underlie how different parts of the brain learn.;;;
+parte4_020|What evidence is there against the idea of a simple algorithm for intelligence?|What evidence is there against the idea of a simple algorithm for intelligence?;;;
+parte4_021|Some evidence comes from the fields of evolutionary psychology and neuroanatomy.|Some evidence comes from the fields of evolutionary psychology and neuroanatomy.;;;
+parte4_022|Since the 1960s evolutionary psychologists have discovered a wide range of human universals|Since the nineteen sixties evolutionary psychologists have discovered a wide range of human universals;;;
+parte4_023|complex behaviours common to all humans|complex behaviours common to all humans;;;
+parte4_024|across cultures and upbringing.|across cultures and upbringing.;;;
+parte4_025|These human universals include the incest taboo between mother and son,|These human universals include the incest taboo between mother and son,;;;
+parte4_026|the use of music and dance, as well as much complex linguistic structure,|the use of music and dance, as well as much complex linguistic structure,;;;
+parte4_027|such as the use of swear words|such as the use of swear words;;;
+parte4_028|pronouns, and even structures as basic as the verb.|pronouns, and even structures as basic as the verb.;;;
+parte4_029|Complementing these results, a great deal of evidence from neuroanatomy shows that many human behaviours|Complementing these results, a great deal of evidence from neuroanatomy shows that many human behaviours;;;
+parte4_030|are controlled by particular localized areas of the brain,|are controlled by particular localized areas of the brain,;;;
+parte4_031|and those areas seem to be similar in all people.|and those areas seem to be similar in all people.;;;
+parte4_032|Taken together, these findings suggest that many very specialized behaviours|Taken together, these findings suggest that many very specialized behaviours;;;
+parte4_033|are hardwired into particular parts of our brains.|are hardwired into particular parts of our brains.;;;
+parte4_034|Some people conclude from these results that separate explanations must be required|Some people conclude from these results that separate explanations must be required;;;
+parte4_035|for these many brain functions,|for these many brain functions,;;;
+parte4_036|and that as a consequence there is an irreducible complexity to the brain's function,|and that as a consequence there is an irreducible complexity to the brain's function,;;;
+parte4_037|a complexity that makes a simple explanation for the brain's operation|a complexity that makes a simple explanation for the brain's operation;;;
+parte4_038|and, perhaps, a simple algorithm for intelligence|and, perhaps, a simple algorithm for intelligence;;;
+parte4_039|For example, one well-known artificial intelligence researcher with this point of view is Marvin Minsky.|For example, one well-known artificial intelligence researcher with this point of view is Marvin Minsky.;;;
+parte4_040|In the 1970s and 1980s|In the nineteen seventies and nineteen eighties;;;
+parte4_041|Minsky developed his "Society of Mind" theory|Minsky developed his "Society of Mind" theory;;;
+parte4_042|based on the idea that human intelligence is the result of a large society of individually simple|based on the idea that human intelligence is the result of a large society of individually simple;;;
+parte4_043|but very different, computational processes|but very different, computational processes;;;
+parte4_044|which Minsky calls agents.|which Minsky calls agents.;;;
+parte4_045|In his book describing the theory, Minsky sums up what he sees as the power of this point of view|In his book describing the theory, Minsky sums up what he sees as the power of this point of view;;;
+parte4_046|What magical trick makes us intelligent?|What magical trick makes us intelligent?;;;
+parte4_047|The trick is that there is no trick.|The trick is that there is no trick.;;;
+parte4_048|The power of intelligence stems from our vast diversity,|The power of intelligence stems from our vast diversity,;;;
+parte4_049|not from any single, perfect principle.|not from any single, perfect principle.;;;
+parte4_050|In a response to reviews of his book, Minsky elaborated on the motivation for the Society of Mind|In a response to reviews of his book, Minsky elaborated on the motivation for the Society of Mind;;;
+parte4_051|giving an argument similar to that stated above,|giving an argument similar to that stated above,;;;
+parte4_052|based on neuroanatomy and evolutionary psychology|based on neuroanatomy and evolutionary psychology;;;
+parte4_053|We now know that the brain itself is composed of hundreds of different regions and nuclei,|We now know that the brain itself is composed of hundreds of different regions and nuclei,;;;
+parte4_054|each with significantly different architectural elements and arrangements,|each with significantly different architectural elements and arrangements,;;;
+parte4_055|and that many of them are involved with demonstrably different aspects of our mental activities.|and that many of them are involved with demonstrably different aspects of our mental activities.;;;
+parte4_056|This modern mass of knowledge shows that many phenomena|This modern mass of knowledge shows that many phenomena;;;
+parte4_057|traditionally described by commonsense terms like "intelligence" or "understanding"|traditionally described by commonsense terms like "intelligence" or "understanding";
+parte4_058|actually involve complex assemblies of machinery.|actually involve complex assemblies of machinery.;;;
+parte4_059|Minsky is, of course, not the only person to hold a point of view along these lines|Minsky is, of course, not the only person to hold a point of view along these lines;;;
+parte4_060|I'm merely giving him as an example of a supporter of this line of argument.|I'm merely giving him as an example of a supporter of this line of argument.;;;
+parte4_061|I find the argument interesting, but don't believe the evidence is compelling.|I find the argument interesting, but don't believe the evidence is compelling.;;;
+parte4_062|While it's true that the brain is composed of a large number of different regions,|While it's true that the brain is composed of a large number of different regions,;;;
+parte4_063|with different functions|with different functions;;;
+parte4_064|it does not therefore follow that a simple explanation for the brain's function is impossible.|it does not therefore follow that a simple explanation for the brain's function is impossible.;;;
+parte4_065|Perhaps those architectural differences arise out of common underlying principles,|Perhaps those architectural differences arise out of common underlying principles,;;;
+parte4_066|much as the motion of comets, the planets, the sun and the stars|much as the motion of comets, the planets, the sun and the stars;;;
+parte4_067|all arise from a single gravitational force.|all arise from a single gravitational force.;;;
+parte4_068|Neither Minsky nor anyone else|Neither Minsky nor anyone else;;;
+parte4_069|has argued convincingly against such underlying principles.|has argued convincingly against such underlying principles.;;;
+parte4_070|My own prejudice is in favour of there being a simple algorithm for intelligence.|My own prejudice is in favour of there being a simple algorithm for intelligence.;;;
+parte4_071|And the main reason I like the idea, above and beyond the inconclusive arguments above, is that it's an optimistic idea.|And the main reason I like the idea, above and beyond the inconclusive arguments above, is that it's an optimistic idea.;;;
+parte4_072|When it comes to research, an unjustified optimism is often more productive than a seemingly better justified pessimism,|When it comes to research, an unjustified optimism is often more productive than a seemingly better justified pessimism,;;;
+parte4_073|for an optimist has the courage to set out and try new things.|for an optimist has the courage to set out and try new things.;;;
+parte4_074|That's the path to discovery|That's the path to discovery;;;
+parte4_075|not what was originally hoped|not what was originally hoped;;;
+parte4_076|A pessimist may be more "correct" in some narrow sense|A pessimist may be more "correct" in some narrow sense;;;
+parte4_077|but will discover less than the optimist.|but will discover less than the optimist.;;;
+parte4_078|This point of view is in stark contrast to the way we usually judge ideas|This point of view is in stark contrast to the way we usually judge ideas;;;
+parte4_079|by attempting to figure out whether they are right or wrong.|by attempting to figure out whether they are right or wrong.;;;
+parte4_080|But it can be the wrong way of judging a big, bold idea|But it can be the wrong way of judging a big, bold idea;;;
+parte4_081|the sort of idea that defines an entire research program|the sort of idea that defines an entire research program;;;
+parte4_082|Sometimes, we have only weak evidence about whether such an idea is correct or not.|Sometimes, we have only weak evidence about whether such an idea is correct or not.;;;
+parte4_083|We can meekly refuse to follow the idea, instead spending all our time squinting at the available evidence|We can meekly refuse to follow the idea, instead spending all our time squinting at the available evidence;;;
+parte4_084|trying to discern what's true.|trying to discern what's true.;;;
+parte4_085|Or we can accept that no-one yet knows|Or we can accept that no-one yet knows;;;
+parte4_086|and instead work hard on developing the big, bold idea|and instead work hard on developing the big, bold idea;;;
+parte4_087|in the understanding that while we have no guarantee of success|in the understanding that while we have no guarantee of success;;;
+parte4_088|it is only thus that our understanding advances|it is only thus that our understanding advances;;;
+parte4_089|With all that said, in its most optimistic form|With all that said, in its most optimistic form;;;
+parte4_090|I don't believe we'll ever find a simple algorithm for intelligence.|I don't believe we'll ever find a simple algorithm for intelligence.;;;
+parte4_091|To be more concrete, I don't believe we'll ever find a really short Python|To be more concrete, I don't believe we'll ever find a really short Python;;;
+parte4_092|or C or Lisp, or whatever program|or C or Lisp, or whatever program;;;
+parte4_093|let's say, anywhere up to a thousand lines of code - which implements artificial intelligence|let's say, anywhere up to a thousand lines of code - which implements artificial intelligence;;;
+parte4_094|Nor do I think we'll ever find a really easily-described neural network that can implement artificial intelligence.|Nor do I think we'll ever find a really easily-described neural network that can implement artificial intelligence.;;;
+parte4_095|But I do believe it's worth acting as though we could find such a program or network.|But I do believe it's worth acting as though we could find such a program or network.;;;
+parte4_096|That's the path to insight, and by pursuing that path we may one day understand enough|That's the path to insight, and by pursuing that path we may one day understand enough;;;
+parte4_097|to write a longer program or build a more sophisticated network|to write a longer program or build a more sophisticated network;;;
+parte4_098|which those exhibit intelligence.|which those exhibit intelligence.;;;
+parte4_099|And so it's worth acting as though an extremely simple algorithm for intelligence exists.|And so it's worth acting as though an extremely simple algorithm for intelligence exists.;;;
+parte4_100|In the 1980s, the eminent mathematician and computer scientist Jack Schwartz|In the nineteen eighties, the eminent mathematician and computer scientist Jack Schwartz;;;
+parte4_101|was invited to a debate between artificial intelligence proponents and artificial intelligence skeptics.|was invited to a debate between artificial intelligence proponents and artificial intelligence skeptics.;;;
+parte4_102|The debate became unruly|The debate became unruly;;;
+parte4_103|with the proponents making over-the-top claims about the amazing things just round the corner|with the proponents making over-the-top claims about the amazing things just round the corner;;;
+parte4_104|and the skeptics doubling down on their pessimism|and the skeptics doubling down on their pessimism;;;
+parte4_105|claiming artificial intelligence was outright impossible.|claiming artificial intelligence was outright impossible.;;;
+parte4_106|Schwartz was an outsider to the debate|Schwartz was an outsider to the debate;;;
+parte4_107|and remained silent as the discussion heated up|and remained silent as the discussion heated up;;;
+parte4_108|During a lull, he was asked to speak up and state his thoughts on the issues under discussion.|During a lull, he was asked to speak up and state his thoughts on the issues under discussion.;;;
+parte4_109|He said: "Well, some of these developments may lie one hundred Nobel prizes away"|He said: "Well, some of these developments may lie one hundred Nobel prizes away";;;
+parte4_110|It seems to me a perfect response.|It seems to me a perfect response.;;;
+parte4_111|The key to artificial intelligence is simple, powerful ideas|The key to artificial intelligence is simple, powerful ideas;;;
+parte4_112|and we can and should search optimistically for those ideas.|and we can and should search optimistically for those ideas.;;;
+parte4_113|But we're going to need many such ideas,|But we're going to need many such ideas,;;;
+parte4_114|and we've still got a long way to go|and we've still got a long way to go;;;
\ No newline at end of file
diff --git a/LJSpeech-1.1/wavs/put your audio files here.txt b/LJSpeech-1.1/wavs/put your audio files here.txt
new file mode 100644
index 0000000..e69de29
diff --git a/README.md b/README.md
index dc78450..891af97 100644
--- a/README.md
+++ b/README.md
@@ -1,68 +1,99 @@
-# A TensorFlow Implementation of DC-TTS: yet another text-to-speech model
-
-I implement yet another text-to-speech model, dc-tts, introduced in [Efficiently Trainable Text-to-Speech System Based on Deep Convolutional Networks with Guided Attention](https://arxiv.org/abs/1710.08969). My goal, however, is not just replicating the paper. Rather, I'd like to gain insights about various sound projects.
-
-## Requirements
- * NumPy >= 1.11.1
- * TensorFlow >= 1.3 (Note that the API of `tf.contrib.layers.layer_norm` has changed since 1.3)
- * librosa
- * tqdm
- * matplotlib
- * scipy
-
-## Data
-
-
-
-
-
-
-I train English models and an Korean model on four different speech datasets. 1. [LJ Speech Dataset](https://keithito.com/LJ-Speech-Dataset/)
2. [Nick Offerman's Audiobooks](https://www.audible.com.au/search?searchNarrator=Nick+Offerman)
3. [Kate Winslet's Audiobook](https://www.audible.com.au/pd/Classics/Therese-Raquin-Audiobook/B00FF0SLW4/ref=a_search_c4_1_3_srTtl?qid=1516854754&sr=1-3)
4. [KSS Dataset](https://kaggle.com/bryanpark/korean-single-speaker-speech-dataset)
-
-LJ Speech Dataset is recently widely used as a benchmark dataset in the TTS task because it is publicly available, and it has 24 hours of reasonable quality samples.
-Nick's and Kate's audiobooks are additionally used to see if the model can learn even with less data, variable speech samples. They are 18 hours and 5 hours long, respectively. Finally, KSS Dataset is a Korean single speaker speech dataset that lasts more than 12 hours.
-
+# A guide to clone anyone's voice and use it as a text-to-speech with android
+
+
+
+
+
+
+ Table of Contents
+
+ -
+ Introduction
+
+ -
+ Getting Started
+
+
+ - Training
+ - Testing
+ - Creating the android app
+ - Usage
+ - Notes
+
+
+
+
+
+---
+
+## Introduction
+This is a fun little project I made out of boredom. After seeing [Kyubyong's] text-to-speech model, I decided to create an android application that can read what I write with my own voice. If you copy the code and follow my steps, you'll be able to do the same.
+
+[Kyubyong's]: https://github.com/Kyubyong/dc_tts
+[Click here]: https://www.youtube.com/watch?v=NrzY_js8yZ4
+
+## Getting Started
+
+To get a local copy up and running follow these simple steps.
+
+### Prerequisites
+
+This is the most important part. If you want this to work, make sure you have the following things installed. Since the model uses an old version of python and tensorflow, I suggest creating a virtual environment and install everything there.
+
+* []() Python 3.6
+* []() Tensorflow 1.15.0
+* []() librosa
+* []() tqdm
+* []() matplotlib
+* []() scipy
+* []() Android Studio
+* []() An android phone (?)
+* []() Some time to lose
+
+### Data preparation
+
+In order to clone your voice you need around 200 samples of your voice, each one between 2-10 seconds. This means that you can clone anyone's voice with only 15-20 minutes of audio, thanks to transfer learning.
+1. First, you need to download the [pretrained model] if you want to make an english voice. Otherwise, find an online text-to-speech dataset of the desired language and train the model from scratch. For example, I made an italian version of my voice, starting from [this] dataset.
+[Here] you can download the italian pre-trained model I generated.
+Make sure to put the pretrained model inside the 'logdir' directory.
+2. Inside LJSpeech-1.1 you have to edit the transcript.csv file to match your audio samples. Each line must have this format: , where the audio name is without the extension and the normalized sentence contains the conversion from numbers to words. Take a look at the original transcript.csv and you'll understand it easily. Then, copy your audio samples inside the wavs folder. If you want to make the data generation process less painful, I suggest writing the transcript file first, then record the sentences using record.py.
+
+[pretrained model]: https://www.dropbox.com/s/1oyipstjxh2n5wo/LJ_logdir.tar?dl=0
+[this]: https://www.caito.de/2019/01/the-m-ailabs-speech-dataset/
+[here]: https://www.dropbox.com/s/36t6l3c1192mgw4/logdir.rar?dl=0
## Training
- * STEP 0. Download [LJ Speech Dataset](https://keithito.com/LJ-Speech-Dataset/) or prepare your own data.
- * STEP 1. Adjust hyper parameters in `hyperparams.py`. (If you want to do preprocessing, set prepro True`.
- * STEP 2. Run `python train.py 1` for training Text2Mel. (If you set prepro True, run python prepro.py first)
- * STEP 3. Run `python train.py 2` for training SSRN.
-You can do STEP 2 and 3 at the same time, if you have more than one gpu card.
+If you want to understand how the model works, you should read [this paper]. Otherwise, treat it as a black box and mechanically follow my steps.
-## Training Curves
+1. Edit hyperparams.py and make sure that prepro is set to True. Also, edit the data path to match the correct location inside your local pc. Set the batch size to 16 or 32 depending on your ram. You can also tune max_N and max_T.
+2. Run prepo.py only one time. After this step you should see two new folders, 'megs' and 'mals'. If you change dataset, then delete megs and mals and run the prepo.py again.
+3. Run 'python train.py 1'. This is going to take a different amount of steps for each voice, but usually after 10k steps the result should already be decent.
+4. Run 'python train.py 2'. You have to train it at least 2k steps, otherwise the voice will not sound human.
-
+[this paper]: https://arxiv.org/abs/1710.08969
-## Attention Plot
-
+## Testing
-## Sample Synthesis
-I generate speech samples based on [Harvard Sentences](http://www.cs.columbia.edu/~hgs/audio/harvard.html) as the original paper does. It is already included in the repo.
+Open harvard_sentences.txt and edit the lines as you desire. Then, run 'python synthesize.py'. If everything is correct, a 'samples' directory should appear.
- * Run `synthesize.py` and check the files in `samples`.
+## Creating the android app
-## Generated Samples
+As you can see, it's not very comfortable to generate the sentences. That's why I decided to make this process more user-friendly.
+The android app is basically just a wrapper that let you generate the audios, save them locally on the phone and share them.
+When you write something and press the play button in the app, the message is sent to the server.py, that launches synthesize.py and then sends the audio back to the android application.
+If you want to use the application outside your local network, make sure to set up the port forwarding, opening the access to the port written in the server.py. The default port is '1234'. You can change it if you want, but remember to change also the port in the MainActivity.java. You also have to set your ip address in the same file.
+By default the model only computes sentences shorter than 10 seconds, but in the server.py I worked around this problem by splitting the input message into small sentences, then running the synthesize on every sentence and merging the resulting audios.
-| Dataset | Samples |
-| :----- |:-------------|
-| LJ | [50k](https://soundcloud.com/kyubyong-park/sets/dc_tts) [200k](https://soundcloud.com/kyubyong-park/sets/dc_tts_lj_200k) [310k](https://soundcloud.com/kyubyong-park/sets/dc_tts_lj_310k) [800k](https://soundcloud.com/kyubyong-park/sets/dc_tts_lj_800k)|
-| Nick | [40k](https://soundcloud.com/kyubyong-park/sets/dc_tts_nick_40k) [170k](https://soundcloud.com/kyubyong-park/sets/dc_tts_nick_170k) [300k](https://soundcloud.com/kyubyong-park/sets/dc_tts_nick_300k) [800k](https://soundcloud.com/kyubyong-park/sets/dc_tts_nick_800k)|
-| Kate| [40k](https://soundcloud.com/kyubyong-park/sets/dc_tts_kate_40k) [160k](https://soundcloud.com/kyubyong-park/sets/dc_tts_kate_160k) [300k](https://soundcloud.com/kyubyong-park/sets/dc_tts_kate_300k) [800k](https://soundcloud.com/kyubyong-park/sets/dc_tts_kate_800k) |
-| KSS| [400k](https://soundcloud.com/kyubyong-park/sets/dc_tts_ko_400k) |
+## Usage
-## Pretrained Model for LJ
-
-Download [this](https://www.dropbox.com/s/1oyipstjxh2n5wo/LJ_logdir.tar?dl=0).
+1. Import the Android_App folder into Android Studio and edit the ip address to match your ip in MainActivity.java.
+2. Run 'python server.py' on your local pc, then leave it on for as long as you need.
## Notes
-
- * The paper didn't mention normalization, but without normalization I couldn't get it to work. So I added layer normalization.
- * The paper fixed the learning rate to 0.001, but it didn't work for me. So I decayed it.
- * I tried to train Text2Mel and SSRN simultaneously, but it didn't work. I guess separating those two networks mitigates the burden of training.
- * The authors claimed that the model can be trained within a day, but unfortunately the luck was not mine. However obviously this is much fater than Tacotron as it uses only convolution layers.
- * Thanks to the guided attention, the attention plot looks monotonic almost from the beginning. I guess this seems to hold the aligment tight so it won't lose track.
- * The paper didn't mention dropouts. I applied them as I believe it helps for regularization.
- * Check also other TTS models such as [Tacotron](https://github.com/kyubyong/tacotron) and [Deep Voice 3](https://github.com/kyubyong/deepvoice3).
-
+* []() In case something is not clear or you bump into some weird error, don't be afraid to ask.
+* []() This is my first android project, I had no prior experience on mobile development. So the code is probably not optimal, but it works.
+* []() The application runs both an Italian and English model because I have cloned my voice in both languages. I think the code still works with one model without any tweaks though.
diff --git a/data_load.py b/data_load.py
index 745ef98..cf79981 100644
--- a/data_load.py
+++ b/data_load.py
@@ -104,8 +104,8 @@ def get_batch():
if hp.prepro:
def _load_spectrograms(fpath):
fname = os.path.basename(fpath)
- mel = "mels/{}".format(fname.replace("wav", "npy"))
- mag = "mags/{}".format(fname.replace("wav", "npy"))
+ mel = "mels/{}".format(fname.decode("utf-8").replace("wav", "npy"))
+ mag = "mags/{}".format(fname.decode("utf-8").replace("wav", "npy"))
return fname, np.load(mel), np.load(mag)
fname, mel, mag = tf.py_func(_load_spectrograms, [fpath], [tf.string, tf.float32, tf.float32])
diff --git a/demo.gif b/demo.gif
new file mode 100644
index 0000000..c0c88e4
Binary files /dev/null and b/demo.gif differ
diff --git a/fig/aaa b/fig/aaa
deleted file mode 100644
index 8b13789..0000000
--- a/fig/aaa
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/fig/attention.gif b/fig/attention.gif
deleted file mode 100644
index 87df49e..0000000
Binary files a/fig/attention.gif and /dev/null differ
diff --git a/fig/training_curves.png b/fig/training_curves.png
deleted file mode 100644
index 44059ca..0000000
Binary files a/fig/training_curves.png and /dev/null differ
diff --git a/hyperparams.py b/hyperparams.py
index 7cbffa0..52d1f0b 100644
--- a/hyperparams.py
+++ b/hyperparams.py
@@ -32,16 +32,19 @@ class Hyperparams:
attention_win_size = 3
# data
- data = "/data/private/voice/LJSpeech-1.0"
+ data = r"C:\Users\Sax\Desktop\robe\Progetti\TTS\modello inglese\TTS\LJSpeech-1.1"
# data = "/data/private/voice/kate"
test_data = 'harvard_sentences.txt'
vocab = "PE abcdefghijklmnopqrstuvwxyz'.?" # P: Padding, E: EOS.
- max_N = 180 # Maximum number of characters.
- max_T = 210 # Maximum number of mel frames.
+ #max_N = 180 # Maximum number of characters.
+ #max_T = 210 # Maximum number of mel frames.
+ max_N = 143
+ max_T = 120
# training scheme
lr = 0.001 # Initial learning rate.
+ lang = "ENG"
logdir = "logdir/LJ01"
sampledir = 'samples'
- B = 32 # batch size
- num_iterations = 2000000
+ B = 16 # batch size
+ num_iterations = 1000
diff --git a/logdir/LJ01-1/here the pretrained text2mel.txt b/logdir/LJ01-1/here the pretrained text2mel.txt
new file mode 100644
index 0000000..e69de29
diff --git a/logdir/LJ01-2/here the pretrained SSRN.txt b/logdir/LJ01-2/here the pretrained SSRN.txt
new file mode 100644
index 0000000..e69de29
diff --git a/record.py b/record.py
new file mode 100644
index 0000000..2ca40ba
--- /dev/null
+++ b/record.py
@@ -0,0 +1,51 @@
+import pyaudio
+import wave
+import keyboard
+
+# Press enter to start the recording, then press the keyboard to stop it
+
+chunk = 1024
+sample_format = pyaudio.paInt16
+channels = 2
+fs = 44100
+seconds = 11 # max duration
+
+# read the file and cycle for each sentence
+with open("transcript.csv", "r") as f:
+ for line in f:
+ tokens = line.split("|")
+ index = tokens[0]
+ sentence = tokens[1]
+ p = pyaudio.PyAudio()
+ input(f"Next: {sentence}")
+ print('Recording...')
+
+ stream = p.open(format=sample_format,
+ channels=channels,
+ rate=fs,
+ frames_per_buffer=chunk,
+ input=True)
+
+ frames = []
+
+ # Store data in chunks for 10 seconds
+ for i in range(0, int(fs / chunk * seconds)):
+ if (keyboard.is_pressed(' ')):
+ break
+ data = stream.read(chunk)
+ frames.append(data)
+
+ stream.stop_stream()
+ stream.close()
+ p.terminate()
+
+ print('Finished recording')
+
+ # Save the recorded data as a WAV file
+ wf = wave.open(f"{index}.wav", 'wb')
+
+ wf.setnchannels(channels)
+ wf.setsampwidth(p.get_sample_size(sample_format))
+ wf.setframerate(fs)
+ wf.writeframes(b''.join(frames))
+ wf.close()
\ No newline at end of file
diff --git a/server.py b/server.py
new file mode 100644
index 0000000..a189014
--- /dev/null
+++ b/server.py
@@ -0,0 +1,64 @@
+import socket
+import os
+from playsound import playsound
+from pydub import AudioSegment
+
+
+def sendToClient(msg):
+ msg = msg.decode('utf-8')
+ lang = msg[:3] # ITA or ENG
+ msg = msg[3:] # actual message
+ words = msg.split(" ")
+ if len(words) > 18:
+ sentences = []
+ sentence = ""
+ for i in range(len(words)):
+ sentence += words[i] + " "
+ if i%12 == 0 and i != 0:
+ sentences.append(sentence)
+ sentence = ""
+ elif i == len(words)-1:
+ sentences.append(sentence)
+
+ with open('harvard_sentences.txt','w') as f:
+ first = True
+ for i, sentence in enumerate(sentences, start=1):
+ if first:
+ f.write("first line\n1. "+str(sentence)+"\n")
+ first = False
+ else:
+ f.write(f"{i}. {str(sentence)}\n")
+
+ num_sentences = len(sentences)
+ else:
+ with open('harvard_sentences.txt','w') as f:
+ f.write("first line\n1. "+str(msg)+"\n")
+ num_sentences = 1
+ os.system('python synthesize.py '+lang)
+ sounds = 0
+ for i in range(0, num_sentences):
+ sounds += AudioSegment.from_wav(f"samples/{i+1}.wav")
+ # increase volume by 10dB
+ sounds += 10
+ sounds.export("backup/final.wav", format="wav")
+ f.close()
+ with open('backup/final.wav', 'rb') as f:
+ audiob = f.read()
+ clientsocket.send(audiob)
+ clientsocket.close()
+ f.close()
+
+
+if __name__ == '__main__':
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ s.bind(("0.0.0.0", 1234))
+ s.listen(5)
+
+ while True:
+ print("Waiting for connection...")
+ clientsocket, address = s.accept()
+ print(f"Connection from {address} has been established")
+ msg = clientsocket.recv(2048)
+ print(msg)
+ sendToClient(msg)
+
diff --git a/synthesize.py b/synthesize.py
index 6043ccd..78c7fde 100644
--- a/synthesize.py
+++ b/synthesize.py
@@ -8,7 +8,7 @@
from __future__ import print_function
import os
-
+import sys
from hyperparams import Hyperparams as hp
import numpy as np
import tensorflow as tf
@@ -18,7 +18,7 @@
from scipy.io.wavfile import write
from tqdm import tqdm
-def synthesize():
+def synthesize(lang):
# Load data
L = load_data("synthesize")
@@ -31,13 +31,13 @@ def synthesize():
# Restore parameters
var_list = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, 'Text2Mel')
saver1 = tf.train.Saver(var_list=var_list)
- saver1.restore(sess, tf.train.latest_checkpoint(hp.logdir + "-1"))
+ saver1.restore(sess, tf.train.latest_checkpoint(hp.logdir + f"-1{lang}"))
print("Text2Mel Restored!")
var_list = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES, 'SSRN') + \
tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, 'gs')
saver2 = tf.train.Saver(var_list=var_list)
- saver2.restore(sess, tf.train.latest_checkpoint(hp.logdir + "-2"))
+ saver2.restore(sess, tf.train.latest_checkpoint(hp.logdir + f"-2{lang}"))
print("SSRN Restored!")
# Feed Forward
@@ -64,7 +64,8 @@ def synthesize():
write(hp.sampledir + "/{}.wav".format(i+1), hp.sr, wav)
if __name__ == '__main__':
- synthesize()
+ lang = sys.argv[1] # ITA or ENG
+ synthesize(lang)
print("Done")
diff --git a/train.py b/train.py
index d69fad2..71806fe 100644
--- a/train.py
+++ b/train.py
@@ -16,8 +16,7 @@
import tensorflow as tf
from utils import *
import sys
-
-
+import os
class Graph:
def __init__(self, num=1, mode="train"):
'''
@@ -140,15 +139,22 @@ def __init__(self, num=1, mode="train"):
g = Graph(num=num); print("Training Graph loaded")
- logdir = hp.logdir + "-" + str(num)
+ logdir = hp.logdir + "-" + str(num) + hp.lang
+ try:
+ os.mkdir(logdir)
+ print(f"Created Folder for {hp.lang}")
+ except OSError as error:
+ print(error)
sv = tf.train.Supervisor(logdir=logdir, save_model_secs=0, global_step=g.global_step)
with sv.managed_session() as sess:
- while 1:
+ for i in range(0,hp.num_iterations):
+ print(f"Step {i+1}")
for _ in tqdm(range(g.num_batch), total=g.num_batch, ncols=70, leave=False, unit='b'):
gs, _ = sess.run([g.global_step, g.train_op])
# Write checkpoint files at every 1k steps
if gs % 1000 == 0:
+ print("Reached 1k")
sv.saver.save(sess, logdir + '/model_gs_{}'.format(str(gs // 1000).zfill(3) + "k"))
if num==1:
@@ -156,7 +162,4 @@ def __init__(self, num=1, mode="train"):
alignments = sess.run(g.alignments)
plot_alignment(alignments[0], str(gs // 1000).zfill(3) + "k", logdir)
- # break
- if gs > hp.num_iterations: break
-
print("Done")