def test_languagebind_model_inference_pipeline_vectorise_audio_with_chunk(self):
        """Test that the pipeline returns the embeddings for the one audio files with chunking."""
        audio_inference_request = InferenceRequest(
            modality=Modality.AUDIO,
            contents=[
                TestAudioUrls.AUDIO1.value,  # 5 seconds
            ],
            device="cuda",
            model_config=ModelConfig(
                model_name=self.model_name,
                model_properties=self.model_properties,
                normalize_embeddings=True
            ),
            preprocessing_config=AudioPreprocessingConfig(
                should_chunk=True,
                download_thread_count=1,
                chunk_config=ChunkConfig(
                    split_length=2,
                    split_overlap=1
                )
            )
        )

        results = self.inference.vectorise(audio_inference_request)
        self.assertTrue(isinstance(results, InferenceResult))
        self.assertTrue(isinstance(results.result, list))
        self.assertTrue(len(results.result) == 1)

        results_1: list[tuple[str, ndarray]] = results.result[0]
        self.assertTrue(isinstance(results_1, list))
        self.assertEqual(4, len(results_1)) # We should see 4 chunks

        expected_chunks = [
            "[0.0, 2.0]",
            "[1.0, 3.0]",
            "[2.0, 4.0]",
            "[3.0, 5.0]"
        ]

        for i, chunk in enumerate(results_1):
            self.assertTrue(isinstance(chunk, tuple))
            self.assertTrue(isinstance(chunk[0], str))
            self.assertTrue(isinstance(chunk[1], np.ndarray))
            self.assertEqual((768,), chunk[1].shape)
            self.assertEqual(expected_chunks[i], chunk[0])
Test that the pipeline returns the embeddings for the one audio files with chunking.
tests/integ_tests/inference/native_inference/test_languagebind_model_inference_pipeline.py