<commit_before>var voicejs = require('../voice.js');
var fs = require('fs');

var client = new voicejs.Client({
	email: '<EMAIL>',
	password: 'password',
	tokens: require('./tokens.json')
});


// Download the recorded name on your GV account
client.name('get', function(error, response, data){
	if(error){
		return console.log(error);
	}
	
	fs.writeFileSync('name.mp3', data);
	console.log('Name audio file downloaded.')
});


// Receive a call to record a new name
client.name('record',{ number: '<EMAIL>'}, function(error, response, data){
	if(error){
		return console.log(error);
	}
	
	console.log('Calling you.');
	
	// cancel the call after 7 seconds
	setTimeout(function(){
		console.log('Cancelling call.')
		client.name('cancel', function(error, response, data){
			return error ? console.log(error) : console.log('Call cancelled.');
		});
	}, 7000)
});<commit_msg>updated name callback example<commit_after>var voicejs = require('../voice.js');
var fs = require('fs');

var client = new voicejs.Client({
	email: '<EMAIL>',
	password: 'password',
	tokens: require('./tokens.json')
});


// Download the recorded name on your GV account
client.name('get', function(error, response, data){
	if(error){
		return console.log(error);
	}
	
	fs.writeFileSync('name.mp3', data);
	console.log('Name audio file downloaded.')
});


// Receive a call to record a new name on your Google Talk phone
client.name('record',{ number: '<EMAIL>'}, function(error, response, data){
	if(error){
		return console.log(error);
	}
	
	console.log('Calling you.');
	
	// cancel the call after 7 seconds
	setTimeout(function(){
		console.log('Cancelling call.')
		client.name('cancel', function(error, response, data){
			return error ? console.log(error) : console.log('Call cancelled.');
		});
	}, 7000)
});
{'fraction_non_alphanumeric': 0.1776536312849162, 'fraction_numerical': 0.0067039106145251395, 'mean_word_length': 4.579439252336448, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3692807', 'n_tokens_mistral': 601, 'n_tokens_neox': 564, 'n_words': 158}