I think @benoriol 's method is OK.
Suppose your input shape is (12, ), you can reshape it to (1, 12), then use Conv1D.  Conv1D input_channel = 1,  out_channel = 1, kernel_size = 4, stride = 4. I just test it by this code:
input = torch.rand(1, 1, 12)
conv1 = torch.nn.Conv1d(1, 1, 4, stride=4)
out =  conv1(input)

the output shape is (1, 1, 3)