Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it gets stuck/frozen on some sentences and cant handle big strings #20

Open
lever1209 opened this issue May 5, 2021 · 3 comments
Open

Comments

@lever1209
Copy link

i was making a wav file for the entire bee movie script to annoy some friends on a bluetooth speaker
i ran into two problems so far,

one is if you hand over a big string, it will create phonemes, but for some reason will stop after a certain amount and use only what it had generated so far

another thing is it freezes up on special characters sometimes, i had to use a regex preprocessor to filter the characters and build about 1000 separate commands to run with it, so i could have the bee movie script spoken with this program

@lever1209
Copy link
Author

lever1209 commented May 5, 2021

this is what i used, for a filter, its probably ass code because i threw it together in 5 mins, but it should work

StringBuilder sB = new StringBuilder();
		Scanner myReader;
		try {
			myReader = new Scanner(new File("input file path containing the bulk text"));
			while (myReader.hasNextLine()) {
				sB.append(myReader.nextLine());
			}
		} catch (FileNotFoundException e1) {
			e1.printStackTrace();
		}
		String[] nin = String.valueOf(sB).split("\\s+");
		FileWriter myWriter;
		try {
			myWriter = new FileWriter(new File("output file"));
			int count = 0;
			StringBuilder s = new StringBuilder();
			StringBuilder si = new StringBuilder();
			int batchCount = 0;
			for (String i : nin) {
				for (char j : i.toCharArray()) {
					if (!String.valueOf(j).matches("\\W")) {
						si.append(j);
					}
				}
				count++;
				if (count >= 10) {
					s.append(si + " ");
					myWriter.write("samcommand -wav subfolder\\" + batchCount + ".wav " + s);
					count = 0;
					batchCount++;
					s.delete(0, s.length());
				} else {
					s.append(si + " ");
				}
				si.delete(0, si.length());
			}
			myWriter.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

@docbrown
Copy link

I hope this starts a trend of using the Bee Movie script to test speech synthesis engines.

@0x5066
Copy link

0x5066 commented May 10, 2021

the character limitation is a limitation coming from SAM on the c64 itself, and i suppose this repo only intends for it to be as close to the original disassembly as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants