import numpy as np
import librosa
sr = 44100
frame_length = 4096 
hop_length = 1024 
stream = librosa.stream('final.wav', block_length=800, frame_length=frame_length, hop_length=hop_length)

mel_specs_log_zcr = []
for y in stream:
    mel = librosa.feature.melspectrogram(y, sr=sr, center=False, n_fft=4096, hop_length = 1024)
    log_mel=librosa.power_to_db(mel)
    zcr = librosa.feature.zero_crossing_rate(y, center=False, frame_length = 4096, hop_length = 1024 )
    zcr = np.tile(zcr, (128, 1))
    mel_spec_log_zcr = np.stack((log_mel, zcr), axis=2)
    mel_specs_log_zcr.append(mel_spec_log_zcr)

import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.python.ops.gen_array_ops import reshape

model = keras.Sequential(
        [
        keras.Input(shape=(128, 800, 2)),
        layers.Conv2D(16, (3, 3), activation='relu', padding="same"),
        layers.BatchNormalization(),
        layers.MaxPooling2D(pool_size=(5, 4)),
        layers.Conv2D(8, kernel_size=(4,1),strides=(4,1), activation='relu', padding="same"),
        layers.BatchNormalization(),
        layers.MaxPooling2D(pool_size=(6, 5)),
        layers.Reshape((40,8)),
        layers.Bidirectional(layers.LSTM(8, return_sequences=True)),
        layers.Dense(7),
        ]
    )

model.summary()

model.compile(
    loss=keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    optimizer = keras.optimizers.Adadelta(),
    metrics = ["accuracy"],
)

with open("final.txt", "r") as f:
  text = f.read()
labels = []
text = text.split("\n")
for t in text:
  line = t.split("\t")
  labels.append(line)

x_train = mel_specs_log_zcr
y_train = np.array(labels)

model.fit(x_train, y_train, batch_size=64, epochs=10)

This is what I have. But obviously hti sis not how data should be feeded into the CNN LSTM model.
So I get the error

ValueError: Data cardinality is ambiguous:
x sizes: 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128
y sizes: 1007
Make sure all arrays contain the same number of samples.

@Kzyh