mirror of
https://github.com/xiph/opus.git
synced 2025-06-06 07:21:03 +00:00
Error messages
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
This commit is contained in:
parent
7dc696b9a4
commit
03dcb8195f
1 changed files with 11 additions and 1 deletions
12
dnn/lpcnet.c
12
dnn/lpcnet.c
|
@ -204,15 +204,25 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
fin = fopen(argv[1], "rb");
|
||||
if (fin == NULL) {
|
||||
fprintf(stderr, "Can't open %s\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fout = fopen(argv[2], "wb");
|
||||
if (fout == NULL) {
|
||||
fprintf(stderr, "Can't open %s\n", argv[2]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
while (1) {
|
||||
float in_features[NB_TOTAL_FEATURES];
|
||||
float features[NB_FEATURES];
|
||||
short pcm[FRAME_SIZE];
|
||||
fread(in_features, sizeof(features[0]), NB_TOTAL_FEATURES, fin);
|
||||
if (feof(fin)) break;
|
||||
RNN_COPY(features, in_features, NB_FEATURES);
|
||||
RNN_CLEAR(&features[18], 18);
|
||||
if (feof(fin)) break;
|
||||
lpcnet_synthesize(net, pcm, features, FRAME_SIZE);
|
||||
fwrite(pcm, sizeof(pcm[0]), FRAME_SIZE, fout);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue