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

Fix example server and add use gpu instruction in readme #185

Merged
merged 2 commits into from
Jul 17, 2024

Conversation

goriri
Copy link
Contributor

@goriri goriri commented Jul 15, 2024

No description provided.

Copy link
Owner

@PABannier PABannier 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 for the PR @goriri ! I have a few comments regarding formatting and cleaning the codebase.

std::string hostname = "127.0.0.1";
std::string public_path = "examples/server/public";
int32_t port = 1337;
int32_t read_timeout = 600;
int32_t write_timeout = 600;
};

struct bark_params {
int32_t n_threads = std::min(1, static_cast<int32_t>(std::thread::hardware_concurrency()));
// struct bark_params {
Copy link
Owner

Choose a reason for hiding this comment

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

rm the comments if no longer used

bool model_req = false;
for (int i = 1; i < argc; i++) {
for (int i = 1; i < argc; i++)
{
Copy link
Owner

Choose a reason for hiding this comment

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

We favour the curly braces on the same line as the statement. Please revert these changes.

Suggested change
{
for (int i = 1; i < argc; i++) {

std::string dest_wav_path = "/tmp/bark_tmp.wav";
bark_generate_audio(bctx, text.c_str(), params.n_threads);
// generate audio
Copy link
Owner

Choose a reason for hiding this comment

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

rm comments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed all these as requested.

@PABannier PABannier merged commit 03d7099 into PABannier:main Jul 17, 2024
6 checks passed
@PABannier
Copy link
Owner

@goriri Thanks for the PR! :)

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