def METHOD_NAME(
    sagemaker_session,
    framework_version,
    image_uri,
    instance_type,
    model_dir,
    accelerator_type=None,
    **kwargs,
):
    endpoint_name = sagemaker.utils.unique_name_from_base(
        "sagemaker-huggingface-serving-speech-model"
    )
    env = {
        "HF_MODEL_ID": "hf-internal-testing/tiny-random-wav2vec2",
        "HF_TASK": "automatic-speech-recognition",
    }
    hf_model = HuggingFaceModel(
        env=env,
        role="SageMakerRole",
        image_uri=image_uri,
        sagemaker_session=sagemaker_session,
        predictor_cls=Predictor,
    )
    with timeout_and_delete_endpoint(endpoint_name, sagemaker_session, minutes=30):
        predictor = hf_model.deploy(
            initial_instance_count=1,
            instance_type=instance_type,
            endpoint_name=endpoint_name,
        )
        predictor.serializer = DataSerializer(content_type="audio/wave")
        predictor.deserializer = JSONDeserializer()
        output = predictor.predict(audio_sample_file_path)
        assert "text" in output