noahsettersten commited on
Commit
fcef16d
1 Parent(s): 629806a

chore!: Disable audio pipeline for now

Browse files

This will be reconsidered in https://app.asana.com/0/1206407201118057/1206451435774948/f

lib/medical_transcription/audio/recording_pipeline.ex CHANGED
@@ -3,27 +3,40 @@ defmodule MedicalTranscription.Audio.RecordingPipeline do
3
  Creates a Membrane pipeline for streaming audio from the user's audio input, through the transcription filter, and
4
  to a destination process.
5
  """
6
- import Membrane.ChildrenSpec
7
- alias Membrane.RCPipeline
8
 
9
- def start_pipeline(pid) do
10
- pipeline = RCPipeline.start_link!()
11
- RCPipeline.exec_actions(pipeline, spec: spec(pid))
12
 
13
- pipeline
14
- end
 
 
 
 
 
 
15
 
16
- def stop_pipeline(pipeline) do
17
- RCPipeline.terminate(pipeline)
18
  end
19
 
20
- defp spec(destination_pid) do
21
- child(%Membrane.PortAudio.Source{channels: 1, sample_format: :f32le, sample_rate: 16_000})
22
- |> child(MedicalTranscription.Audio.TranscriptionFilter)
23
- |> child(%Membrane.Debug.Sink{
24
- handle_buffer: fn buffer ->
25
- send(destination_pid, {:received_audio_payload, buffer.payload})
26
- end
27
- })
28
  end
 
 
 
 
 
 
 
 
 
 
 
 
29
  end
 
3
  Creates a Membrane pipeline for streaming audio from the user's audio input, through the transcription filter, and
4
  to a destination process.
5
  """
 
 
6
 
7
+ # import Membrane.ChildrenSpec
8
+ # alias Membrane.RCPipeline
 
9
 
10
+ def start_pipeline(_pid) do
11
+ # This is disabled for now, as we need to implement client-side audio recording in a different manner.
12
+ # See https://app.asana.com/0/1206407201118057/1206451435774948/f
13
+ #
14
+ # pipeline = RCPipeline.start_link!()
15
+ # RCPipeline.exec_actions(pipeline, spec: spec(pid))
16
+ #
17
+ # pipeline
18
 
19
+ :noop
 
20
  end
21
 
22
+ def stop_pipeline(_pipeline) do
23
+ # This is disabled for now, as we need to implement client-side audio recording in a different manner.
24
+ # See https://app.asana.com/0/1206407201118057/1206451435774948/f
25
+ #
26
+ # RCPipeline.terminate(pipeline)
27
+
28
+ :noop
 
29
  end
30
+
31
+ # This is disabled for now, as we need to implement client-side audio recording in a different manner.
32
+ # See https://app.asana.com/0/1206407201118057/1206451435774948/f
33
+ # defp spec(destination_pid) do
34
+ # child(%Membrane.PortAudio.Source{channels: 1, sample_format: :f32le, sample_rate: 16_000})
35
+ # |> child(MedicalTranscription.Audio.TranscriptionFilter)
36
+ # |> child(%Membrane.Debug.Sink{
37
+ # handle_buffer: fn buffer ->
38
+ # send(destination_pid, {:received_audio_payload, buffer.payload})
39
+ # end
40
+ # })
41
+ # end
42
  end
mix.exs CHANGED
@@ -58,8 +58,8 @@ defmodule MedicalTranscription.MixProject do
58
  {:audio_tagger, git: "https://github.com/headwayio/audio_tagger.git"},
59
  {:progress_bar, "~> 3.0"},
60
  {:membrane_core, "~> 1.0"},
61
- {:membrane_raw_audio_format, "~> 0.12.0"},
62
- {:membrane_portaudio_plugin, "~> 0.18.0"}
63
  ]
64
  end
65
 
 
58
  {:audio_tagger, git: "https://github.com/headwayio/audio_tagger.git"},
59
  {:progress_bar, "~> 3.0"},
60
  {:membrane_core, "~> 1.0"},
61
+ {:membrane_raw_audio_format, "~> 0.12.0"}
62
+ # {:membrane_portaudio_plugin, "~> 0.18.0"}
63
  ]
64
  end
65