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

add: request sharding, diskless playback; fix: #10, #14 #16

Closed
wants to merge 0 commits into from

Conversation

kendfss
Copy link

@kendfss kendfss commented Dec 16, 2022

Solves #10 by splitting text into different requests and then combining the output to produce an playable audio stream.
Also tried to help with #14 and #15 by editing the Readme a bit.
Tried to do #5 but I've still not found any docs for the api, or anybody using it with a request that uses fields that this module doesn't. If you don't mind me asking, how did you find out about it? Seems so obscure, lol

Copy link
Owner

@hegedustibor hegedustibor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much that you send this PR. 🚀 Please check my suggestions for the merge process.

htgotts.go Outdated
func (speech *Speech) createFolderIfNotExists(folder string) error {
dir, err := os.Open(folder)
if os.IsNotExist(err) {
return os.MkdirAll(folder, 0700)
return os.MkdirAll(folder, 0o700)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove this "o" from the permission code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the first line, 0700, the prefix "0" indicates an octal literal, and the digits "700" represent the permission value in octal. This octal value translates to rwx------ in the symbolic representation, which means the owner has read, write, and execute permissions, while others have no permissions.

In the second line, 0o700, the prefix "0o" is an alternative representation introduced in Go 1.13 to make it more explicit that the value is an octal literal. The digits "700" still represent the permission value in octal, and it has the same meaning as in the first line.

I think the change was made by my language server though, not me, so it's probably worth defining project specific settings (assuming you can do so for gopls) if this refactor is to be avoided. I for one think it helps though.

@kendfss
Copy link
Author

kendfss commented May 23, 2023

sorry for the delay man. the truth is, I'm pretty sure there's a bug that will cause the algorithm to break for at least chinese and arabic and I wanted to find the time to sit down and properly figure it out but I just cant recover the train of thought I had to notice it. Never having been much of a linguist, I wasn't sure where to start either, lol.
That said, I notice the changes aren't in in the main branch. If you want, to re-open, I can at least implement the requests you made. Otherwise, I could resubmit with them in mind.

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

Successfully merging this pull request may close these issues.

2 participants