I had a problem training my yorkie too. I did not want to leave him in a crate all day, so I had him confined to my bathroom. I used a baby gate to block the doorway. I only would let him out when I could have all eyes on him. If I saw him sniffing around, I'd put him back in the bathroom. I have him trained to go on a dog toilet now because he won't do his business outside. When he goes outside he thinks it's playtime.
Perhaps if you can put your puppy in a slightly larger area...it would help with the barking. Good luck and keep us updated!