mirror of
https://github.com/facefusion/facefusion.git
synced 2026-05-15 03:10:24 +02:00
restore todos
This commit is contained in:
@@ -4,6 +4,7 @@ from typing import Optional
|
||||
from facefusion.libraries import opus as opus_module
|
||||
|
||||
|
||||
# TODO this method needs refinement
|
||||
def create_opus_encoder(sample_rate : int, channels : int) -> Optional[ctypes.c_void_p]:
|
||||
opus_library = opus_module.create_static_library()
|
||||
|
||||
@@ -17,6 +18,7 @@ def create_opus_encoder(sample_rate : int, channels : int) -> Optional[ctypes.c_
|
||||
return None
|
||||
|
||||
|
||||
# TODO this method needs refinement - rename to encode_opus_buffer
|
||||
def encode_opus(opus_encoder : ctypes.c_void_p, pcm_pointer : ctypes.c_void_p, frame_size : int) -> bytes:
|
||||
opus_library = opus_module.create_static_library()
|
||||
audio_buffer = b''
|
||||
|
||||
@@ -25,6 +25,7 @@ def test_create_opus_encoder() -> None:
|
||||
pass
|
||||
|
||||
|
||||
#TODO: rename to test_encode_opus_buffer
|
||||
def test_encode_opus() -> None:
|
||||
audio_buffer = read_audio_buffer(get_test_example_file('source.mp3'), 48000, 16, 2)
|
||||
pcm_samples = numpy.frombuffer(audio_buffer, dtype = numpy.int16).astype(numpy.float32) / 32768.0
|
||||
|
||||
Reference in New Issue
Block a user