Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 committed Aug 3, 2024
1 parent 407330e commit 16b5675
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions c_src/xav/reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ int reader_init(struct Reader *reader, unsigned char *path, size_t path_size, in
#else
av_opt_set_channel_layout(reader->swr_ctx, "in_channel_layout", reader->c->channel_layout, 0);
av_opt_set_channel_layout(reader->swr_ctx, "out_channel_layout", reader->c->channel_layout, 0);
XAV_LOG_DEBUG("in_chlayout %ld", reader->c->channel_layout);
XAV_LOG_DEBUG("in nb_channels %d",
av_get_channel_layout_nb_channels(reader->c->channel_layout));
#endif

av_opt_set_int(reader->swr_ctx, "in_sample_rate", reader->c->sample_rate, 0);
Expand Down
Binary file added test/fixtures/harvard.wav
Binary file not shown.
3 changes: 2 additions & 1 deletion test/reader_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ defmodule Xav.ReaderTest do
test "speech to text" do

Check failure on line 45 in test/reader_test.exs

View workflow job for this annotation

GitHub Actions / test-linux-x86-64 / ubuntu-24.04 / OTP 25 / Elixir 1.14

test speech to text (Xav.ReaderTest)
# This file has been downloaded from https://audio-samples.github.io/
# Section: Samples from the model without biasing or priming.
reader = Xav.Reader.new!("./test/fixtures/melnet_sample_0.mp3", read: :audio)
# reader = Xav.Reader.new!("./test/fixtures/melnet_sample_0.mp3", read: :audio)
reader = Xav.Reader.new!("./test/fixtures/harvard.wav", read: :audio)

{:ok, whisper} = Bumblebee.load_model({:hf, "openai/whisper-tiny"})
{:ok, featurizer} = Bumblebee.load_featurizer({:hf, "openai/whisper-tiny"})
Expand Down

0 comments on commit 16b5675

Please sign in to comment.