-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
There was a problem hiding this 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.
examples/server/server.cpp
Outdated
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 { |
There was a problem hiding this comment.
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
examples/server/server.cpp
Outdated
bool model_req = false; | ||
for (int i = 1; i < argc; i++) { | ||
for (int i = 1; i < argc; i++) | ||
{ |
There was a problem hiding this comment.
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.
{ | |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm comments
There was a problem hiding this comment.
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.
@goriri Thanks for the PR! :) |
No description provided.